I'm new to Newton and I'm using it through latest (I think) OgreNewt that resides here:
https://svn.ogre3d.org/svnroot/ogreaddo ... t/newton20
I'm trying to quickly set up simple vehicle physics and I actually managed to. It works well in RELEASE, I have a big problem in DEBUG mode though.
I've started with example no. 5 (SimpleVehicle) from OgreNewt that uses CustomDGRayCastCar. I've added only a few things: calls to methods SetTireTorque, SetTireSteerAngleForce, SetTireRollingResistance. AFAIR, however, problem started to show up instantly when I started experimenting with vehicle using SetTireTorque exclusively.
The problem is: when vehicle is close to stopping or has low velocity, assertion from CustomDGRayCastCar.cpp, line 927, fails very often, usually at once after setting up world and car, or after few seconds.
Code is from the method CalculateLongitudinalForce and looks like this:
- Code: Select all
if(velocAbs > 1.0e-2f)
{
// ... (apparently calculations of torque, angular velocity and possibly something else)
}
else
{
if(dAbs (tire.m_torque) > 0.1f) {
_ASSERTE(0);
}
}
Now, I don't want to dive too deep into what it means, because I've already achieved most of the mechanics I wanted. Problem seems quite simple, I was even thinking about recompiling library with assertion removed, but it seems to be an overkill method. Do you have any ideas on what things (maybe methods setting some parameters that I could experiment with) that could help me get rid of the issue?
