playMaker

Author Topic: Roll a ball physics controls with TORQUE  (Read 2915 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 553
Roll a ball physics controls with TORQUE
« on: March 25, 2025, 05:57:44 AM »
So I'm creating physics rolling ball controls, and I do NOT want it to be based on force FORCE but on TORQUE. Each and every tutorial out there is based on FORCE, which takes away a huge amount of fun and skill from the game.

The problem is that when adding torque, this can be applied only on SELF space, which is not ok because the ball can have any actual rotation, or on WORLD direction, which is not ok because the camera does not have a fixed direction.

I'm bashing my head for almost 10 hours now but I can't come up with a "clean" solution.
I've tried to build a vector based on the camera axis and torque but it's making the ball rotate on the Y axis and nothing else.
Can anyone point me in the right direction?
« Last Edit: March 25, 2025, 06:20:59 AM by PolyMad »

PolyMad

  • Hero Member
  • *****
  • Posts: 553
Re: Roll a ball physics controls with TORQUE
« Reply #1 on: March 26, 2025, 06:10:32 PM »
Solved.
For anyone who could find it useful, I attach the (simple) solution.
Keep in mind that GameCam_OBJ is not actually the camera but a pivot point placed at the center of the ball, that only rotates on the Y axis, so when I multiply it by the torque, I already have the correct horizontal push.