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!
↧