JoltPhysics: Acceleration problem with sloped suspension
I’m working on bike physics. When I create a bike with a front wheel where the suspension direction is not vertical. and where the rear wheel suspension is vertical, the bike accelerates forwards by itself.
See this video - in it I am not pressing forwards/throttle, the bike is accelerating by itself. I brake half way thru the video and then release the brake. https://www.youtube.com/watch?v=1aKQ4dTFIcw
for front wheel I have:
front_wheel->mDirection = JPH::Vec3(0,-0.5,-1).Normalized();
and for the back wheel
rear_wheel->mDirection = JPH::Vec3(0,0,-1).Normalized();
The bike is kept upright by the old PitchRoll constraint:
vehicle.mMaxPitchRollAngle = JPH::DegreesToRadians(5.0f);
Cheers, Nick
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 63 (23 by maintainers)
Sure, I’ll make that possible.