i am new to the blender game engine and i was trying to make a simple ball rolling game… i wanted to know how can i make a ball rotate while moving …i tried using the motion actuator with an action actuator (roll animation) but i did not get the correct result…
If you make it a rigid body physics type and have friction it will roll by itself.
Yep… You could use a ridgedbody, and apply global forces to it, and friction would make it roll, OR you could apply global torque, thus rotating it and causing it to roll. You could also use Angular Velocity with a lot of dampening frames… These are all in the motion actuator.
i tried them all and i think the angular velocity method is best…
but the ball slides a bit when i stop pressing the movement key…how do i stop it from happening?
and what if i want to use servo control…can i still rotate the ball while moving it??
Glad it helped To prevent sliding, you can use an additional “servo control” movement to bring any velocity to an end. This may take tuning… You want it to activate (preferably briefly; you can use a property to disable it after a short period…) when no directional buttons are pressed… Enable X, Y and Z, and set the min/max of X and Y to 0.0, or close to that, if you still want a little roll. Set the min/max of Z to, like, -100 and 100… Just something that won’t stop it from falling. Also, make sure it applies globally (disable L. This should work, but if it doesn’t, you can also mess around with the “Lin velocity” in the “simple motion” bit…) Turn the Integral Coefficient down for a slower reaction. Hope this helps