Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualSmjert

Posted 10 September 2013 - 12:51 PM

Yes transform.forward is normalized.

I retried to write it with the dot product Vector3.Dot(currentVelocityDir, transform.forward); and using that value to divide the X Netwons and.. it worked!

Or at least this is what it looks like even if, and i think this is due to rounding errors etc, i have a 0.001 increase of speed every second.

The dot between the velocity and the total force is not always 0 (for instance 7.723626E-08), but still a very small value and that's why there's that increase in speed i suppose.

And to keep velocity really constant i have to set it manually if > then expected one.
 


#1Smjert

Posted 10 September 2013 - 12:50 PM

Yes transform.forward is normalized.

I retried to write it with the dot product Vector3.Dot(currentVelocityDir, transform.forward); and using that value to divide the X Netwons and.. it worked!

Or at least this is what it looks like even if, and i think this is due to rounding errors etc, i have a 0.001 increase of speed every second.

The dot between the velocity and the total force is not always 0 (for instance 7.723626E-08), but still a very small value so again i suppose that this is how it has to work.

And to keep velocity really constant i have to set it manually if > then expected one.
 


PARTNERS