[SOLVED] I need help about positional command

I’m try to make a race game and I try to make my car go slower on dirt road / go faster on asphalt road.

How can i do this?

I tried changing the friction on physics, but even if I set the friction to 100000000, there was no change in its speed.

My car moving by “vector” method. (like toy car example)

Hi

I think you are using Set Velocity method, right? So you are just saying to the physics engine to move the rigid body in that velocity no matter other influences. You should use Apply Force method instead, this way you are saying, hey engine, apply this force for me, but also consider the other forces like friction and gravity

So just replace Set Velocity by Apply Force and the problem should be solved…

You can easily move a rigid body at constant speed with “Apply Force” using this formula:

forceToVelocity = (targetVelocity - linearVelocity) / delta * mass

If you don’t know how to translate it to logic nodes or script, i can help you… i suggest you to join Armory discord channel so you can receive help faster

2 Likes

Hey.

Thanks for your answer.

I’m using Translate Object. I will try to learn Apply Force.

Thanks.