playMaker

Author Topic: Get Rotation / Add Force problem  (Read 315 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Get Rotation / Add Force problem
« on: August 13, 2023, 11:46:46 PM »
What I want to do is to get the rotation of an object in World Axis (an arrow that shows the player the direction).
Then use this Vector3 as the direction to shoot a ball, still in World Axis.

I tried everything possible (almost): Euler, Quaternion, split axis values, but nothing seems to work correctly, and the force is always added positively, meaning that the force is always added in world reference going on positive axis, never negative.

What I see in the vector are ANGLES from 0 to 360.
But I recall I was able to make this work in another project time ago, when I saw the values were -0.2, 0.5, 0.3 or something like that in the angles, when I got the values.
As you can see there is a negative here, and I think this is the problem.
I think it was Get Direction, but I can't find it now.

Can anyone point me to the right direction?

PolyMad

  • Hero Member
  • *****
  • Posts: 545
Re: Get Rotation / Add Force problem
« Reply #1 on: August 13, 2023, 11:55:58 PM »
Like I didn't talk: immediately solved.
Must use GET FORWARD DIRECTION.