Vehicle Editor cooking for jMP

2 Likes

This looks really cool. :slight_smile:



I’m going to try this when it’s in the nightly build.

A first version is available through the update center with a basic testing track for the vehicle, work in progress!





Best results when car is facing in z direction (towards you)



Usage:

  • Select a j3o that contains a vehicle model and press the vehicle button (or right-click → edit vehicle)
  • The VehicleCreator automatically adds a PhysicsVehicleControl to the rootNode of the model if there is none
  • Select the Geometry or Node that contains the chassis in the SceneExplorer and press “create hull shape from selected”
  • Select a Geometry that contains a wheel and press “make selected spatial wheel”, select the “front wheel” checkboxes for front wheels
  • Do so for all wheels



    New wheels will get the current suspension settings, you can edit single wheels via the SceneExplorer (update VehicleControl if wheels dont show up) or apply settings created with the settings generator to wheel groups. Also look at the tooltips when hovering the mouse over an option for more hints.



    Press the “test vehicle” button to drive the vehicle, use WASD to control, Enter to reset.



    Known Issues: Dont save while testing the vehicle, you will save the location and acceleration info in the j3o.

What’s still missing is a road system.

neuron said:
What's still missing is a road system.


This should go inside of Terramonkey.

This should go inside of Terramonkey



It’s a recommendation / request. Troubleshooting sounds that it is intended only for technical questions.

But if this is the right area, feel free to move it to that area or tell me how to do it.

i get this when i trie to edit a vehicle:[java]java.lang.NullPointerException

at com.jme3.scene.Spatial.clone(Spatial.java:1114)

at com.jme3.scene.Node.clone(Node.java:576)

at com.jme3.scene.Node.clone(Node.java:60)

at com.jme3.scene.Spatial.clone(Spatial.java:1101)

at com.jme3.scene.Node.clone(Node.java:576)

at com.jme3.scene.Node.clone(Node.java:60)

at com.jme3.scene.Spatial.clone(Spatial.java:1101)

at com.jme3.scene.Node.clone(Node.java:576)

at com.jme3.scene.Node.clone(Node.java:60)

at com.jme3.scene.Spatial.clone(Spatial.java:1101)

at com.jme3.scene.Node.clone(Node.java:576)

at com.jme3.scene.Node.clone(Node.java:60)

at com.jme3.scene.Spatial.clone(Spatial.java:1141)

at com.jme3.asset.ModelKey.createClonedInstance(ModelKey.java:54)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:252)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:348)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:358)

at com.jme3.gde.vehiclecreator.VehicleEditorController.<init>(VehicleEditorController.java:79)

at com.jme3.gde.vehiclecreator.VehicleCreatorTopComponent.openFile(VehicleCreatorTopComponent.java:864)

[catch] at com.jme3.gde.vehiclecreator.EditVehicleAction$1$1.run(EditVehicleAction.java:48)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)

at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

[/java]am I doing something wrong?

Can you open that j3o file in the SceneComposer?

yes.



it’s a scene containing a car model and 4 wheel models.

Are they linked nodes by any chance?

no, they are all added to the scene, not linked

Does that happen also when you open a new empty scene with the vehicle editor?

yes

No idea, the stacktrace is not particularly helpful :confused:

Ok, found it, it was an outdated j3o for the raceway

I need to try this some time :slight_smile: My little nephew would love some type of simulated monster truck game :slight_smile:

is there a way to add the wheels without them being moved to a random position?

The positon is not random but based on the center of the BoundingVolume of the selected Spatial. Please make more specific bugreports, did you try not to select the “make node and center” checkbox?

yes, and it does exactely the same

and when i try to test my car, it starts bouncing.



sorry for all of this posts, but i can’t find the solitions to this problems here.

This is a really cool tool normen :slight_smile: Any idea of when there will be an update / sample for using a created vehicle with jME?