I am trying to set up a simple world with a single vehicle, mostly copied from the VehicleDemo example program in release 2.20b. I am pretty sure I have cut-and-pasted the code correctly, with the main differences being a different polygonal database and the fact that Z is up in my world rather than Y up.
I think i have corrected for the coordinate system and gravity correctly because with my MotionState starting point slightly above the terrain my "vehicle" falls a little and appears to come to rest on the wheels with some suspension compression.
When I call applyEngineForce() on the rear wheels, the vehicle begins to move forward. The problem is, when I call setSteeringValue (with values ranging from -0.3 to 0.3) the vehicle won't steer - it just keeps moving forward as if the tires are not turned. The indices to applyEngineForce and setSteeringValue should be correct.
Any ideas as to what I am doing wrong?
Thanks.
Vehicle Won't Steer?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Vehicle Won't Steer?
Did you already hookup the basic debugDrawer to your renderer?mmorrison wrote:I am trying to set up a simple world with a single vehicle, mostly copied from the VehicleDemo example program in release 2.20b. I am pretty sure I have cut-and-pasted the code correctly, with the main differences being a different polygonal database and the fact that Z is up in my world rather than Y up.
I think i have corrected for the coordinate system and gravity correctly because with my MotionState starting point slightly above the terrain my "vehicle" falls a little and appears to come to rest on the wheels with some suspension compression.
When I call applyEngineForce() on the rear wheels, the vehicle begins to move forward. The problem is, when I call setSteeringValue (with values ranging from -0.3 to 0.3) the vehicle won't steer - it just keeps moving forward as if the tires are not turned. The indices to applyEngineForce and setSteeringValue should be correct.
Any ideas as to what I am doing wrong?
Thanks.
The vehicle demo is hard to debug right now. I just added some debugging rendering for the wheels, to make sure they are in the right place (or are you rendering the wheels already?).
Are you using an unmodified btRaycastVehicle? Did you set the indices of the vehicle like following?
Code: Select all
indexRightAxis = 0;
indexUpAxis = 2;
indexForwardAxis = 1;
http://www.continuousphysics.com/ftp/pu ... leDemo.cpp
Thanks,
Erwin
-
- Posts: 4
- Joined: Thu Nov 09, 2006 12:16 am
-
- Posts: 4
- Joined: Thu Nov 09, 2006 12:16 am
Now my vehicle won't stop.
There seems to be several issues with braking as of version 2.23. btRaycastVehicle::setBrake doesn't set m_brake to the brake value supplied as an argument, and btRaycastVehicle::updateFriction does not take the brake value into account anyway.
Is this just not implemented yet?
Thanks.
There seems to be several issues with braking as of version 2.23. btRaycastVehicle::setBrake doesn't set m_brake to the brake value supplied as an argument, and btRaycastVehicle::updateFriction does not take the brake value into account anyway.
Is this just not implemented yet?
Thanks.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Brakes and gears are not implemented yet.mmorrison wrote:Now my vehicle won't stop.
There seems to be several issues with braking as of version 2.23. btRaycastVehicle::setBrake doesn't set m_brake to the brake value supplied as an argument, and btRaycastVehicle::updateFriction does not take the brake value into account anyway.
Is this just not implemented yet?
Thanks.
Please let me know how urgent you need them, so I can plan them in. Shouldn't be too much work for brakes
Thanks,
Erwin
-
- Posts: 4
- Joined: Thu Nov 09, 2006 12:16 am