Some "Detected NaN in origin vector" are due at this operation:
FIle: Suspension.cc
line 163:
Code:
m_angle = asin (z / m_radius_magnitude);
"z / m_radius_magnitude" should be included between -1.0 and 1.0
Some values are <or> and this make NaN error.
I've used this code
Code:
if( (z / m_radius_magnitude) > 1.0 )
{
m_angle = asin (1.0);
}
else if ( (z / m_radius_magnitude) >= -1.0 )
{
m_angle = asin (z / m_radius_magnitude);
}
else
{
m_angle = asin (-1.0);
}
The stability of game getting better, but there are something wrong.
So, I've continued to investigate.
The problem seem to be:
file: Whell.cc
line 146:
Code:
Three_Vector disp =
(m_normal * distance).back_project (Three_Vector (0.0, 0.0, -1.0));
One of my trials was to substitute : back_project -> project
Code:
Three_Vector disp =
(m_normal * distance).project (Three_Vector (0.0, 0.0, -1.0));
With this modify the game is very stable about NaN error, but is more sensible
when car hit an object. Sometime, the car also goes in free fall.
I don't understand what happen yet
Someone have any idea.
Try my modifies and tell me what do you think about that.
If is your opinion is ok I'll commit two files.
Thanks. pwp71.