If i get the speed of my b2Body:
speed = body.GetLinearVelocity().Length()
How can i normalize the speed value so its between 0 and 1? I ask as i don't know the maximum speed that my body can reach? I would just do speed/maxSpeed normally, however i don't know how to determine maxSpeed? How can you set maxSpeed?
Any help is appreciated 🙂
speed = body.GetLinearVelocity().Length()
How can i normalize the speed value so its between 0 and 1? I ask as i don't know the maximum speed that my body can reach? I would just do speed/maxSpeed normally, however i don't know how to determine maxSpeed? How can you set maxSpeed?
Any help is appreciated 🙂