- Joined
- Jul 3, 2006
- Messages
- 102
I have a beam effect that starts from the hero and goes outwards.
I am trying to get this to face upwards/downwards on slopes. I have a function that calculates slopes in both directions, but I can't seem to get the orientation to work correctly
Setting the roll angle rotates the effect around the Z axis to match the hero's facing - this works.
Setting the pitch, yaw angles does not work consistently and seems to be dependent on the roll angle!?
For example, here I have a hardcoded 45 degree pitch angle (roll matches facing angle always) that changes direction depending on the roll angle:
Pitch 45, Yaw 0, Roll 90 (facing north), it beams upwards (that's telling me pitch rotates around X):
Pitch 45, Yaw 0, Roll 270 (facing south), it beams downwards:
The same effect happens if I hardcode the yaw value.
I don't get why Z rotation would affect the result for X and Y rotation.
Anyone care to explain this situation?
I am trying to get this to face upwards/downwards on slopes. I have a function that calculates slopes in both directions, but I can't seem to get the orientation to work correctly
Setting the roll angle rotates the effect around the Z axis to match the hero's facing - this works.
Setting the pitch, yaw angles does not work consistently and seems to be dependent on the roll angle!?
For example, here I have a hardcoded 45 degree pitch angle (roll matches facing angle always) that changes direction depending on the roll angle:
Pitch 45, Yaw 0, Roll 90 (facing north), it beams upwards (that's telling me pitch rotates around X):
Pitch 45, Yaw 0, Roll 270 (facing south), it beams downwards:
The same effect happens if I hardcode the yaw value.
I don't get why Z rotation would affect the result for X and Y rotation.
Anyone care to explain this situation?
Last edited:















