VehicleControl problems

Okay, so I’m having some pretty odd problems with the VehicleControl class. I’m uploading a video to youtube but in the meantime here’s an explanation:



When I try to get the wheels to spin a certain direction, no matter if I rotate them or not they continually face 90 degrees to the right, and spin on their sides instead of straight. I’ve tried to change the direction of the wheels and their axles, and that hasn’t helped at all. It just turns them on an axis and the entire direction of the car rotates.



In the video, my axle is (-1, 0, 0), and at this axle the car moves sideways. If I change it to (0, 0, -1) I get a result where the wheels don’t turn when the car moves forward, even though that’s the direction the car can be pushed in.



The wheels only turn when the car moves on the local Z axis it seems, and they always rotate on the X axis. I’ve tried rotating the wheel models by 90 degrees on the Y axis, and that seems to have no effect at all Not even the visual representation of the models turns. They just stay the same way.

Is your vehicle z-forward? If not make it so to avoid many problems.

1 Like

http://youtu.be/ob-Dt7quhUI



I don't think it is. I'll rotate the model and re-export. Thanks!

Maybee you defined the axis for the wheels in the false direction?

@EmpirePhoenix said:
Maybee you defined the axis for the wheels in the false direction?


Like I said, I've tried changing it to everything it could be. I'm pretty sure @normen was right, because I rotated the model to be forward Z axis and it's working now. Thanks for the help!

How should I know that my vehicle is Z-forward ?

My vehicle is made in Blender and Blender has weird axisses. The nose of my vehicle is now Y+ in Blender.

+Y is -Z in jME, at least through the blender importer by default. Pressing 1 on the numpad when in blender, should give you the view that should appear in jME.