61

**PlayMaker Help / Rolling a Ball [solved]**

« **on:**July 10, 2011, 12:41:26 PM »

Bah. I need help again.

I am rolling a ball in my game. The player is a normal, bipedal character controlled through the PlatformInputController and CharacterMotor scripts. The player needs to "push" the ball in front of them.

For the ball I am using a sphere with a really high Drag value (so it stops immediately), and applying forces to the ball. My problem is that I can't get the vector right. Since this is a rolling object axes are prone to rotation, so local coordinates aren't reliable for applying a force. What I would like to do is simply apply a force relative to the games camera, however I cant figure out the combination of transforms and calculations in order to get that vector, transform it to world-space, and apply it to my sphere.

As always, help is MUCH appreciated!

I am rolling a ball in my game. The player is a normal, bipedal character controlled through the PlatformInputController and CharacterMotor scripts. The player needs to "push" the ball in front of them.

For the ball I am using a sphere with a really high Drag value (so it stops immediately), and applying forces to the ball. My problem is that I can't get the vector right. Since this is a rolling object axes are prone to rotation, so local coordinates aren't reliable for applying a force. What I would like to do is simply apply a force relative to the games camera, however I cant figure out the combination of transforms and calculations in order to get that vector, transform it to world-space, and apply it to my sphere.

As always, help is MUCH appreciated!