Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

How to make a ball capable of rolling around a loop the loop?

$
0
0
Hello to all. In my game, I want the ball player object to go around a loop the loop like a hotwheels car. I knew that rb.addForce() wouldn't work, since it pushes the ball in one direction corresponding to the key pressed, therefore just ending up pressing against the wall halfway up. Instead, I tried rb.addTorque, but I ran into a problem with that as well, since the different axis turn as the ball does. I think I'll have to make it so that the axis of the ball stays relative to the world, therefore guaranteeing that it will spin in the desired direction, but I have no idea how. If anyone knows or has a better solution, I would be very grateful. Thanks!

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>