I’ve read a bunch of the questions others have posted here about scripts that you can use to control a ball and make it roll around, and while several of them have helped, I’ve run into an issue that I haven’t yet seen addressed (though maybe I just don’t know where to look).
My ball has a reflective material, so the base texture can be seen rolling but the reflection of the surroundings doesn’t move, obviously. What I’d like is to be able to use WASD to roll the ball using physics, but the different approaches I’ve tried all suffer from the same flaw: once I get the ball rolling in one direction, its axes all roll with it, and my controls depend on the axis orientation to tell the engine which way to apply the force/torque, depending on the script I use. Thus, what is up one moment becomes left or back the next moment, and the game is not very playable like that.
Is there either a way to fix the axes while still allowing the ball to give the appearance of rolling, or an alternate way to apply force to the ball that will not require me to reference the axes? I suspect perhaps the Transform.TransformDirection function is what I’m looking for, but I haven’t been able to implement it without getting serious errors.