g64
g64 copied to clipboard
Incorrect prop collision angles
This is too mathy for me, so I'm hoping someone can help me out with this. Gmod "Angle" objects represent pitch, yaw, and roll but will switch order when rotated certain ways (example: rotate a prop 90 degrees "away" from you while printing the angle of it every frame) and messes with the rotation in sm64.
For instance, rotating a prop "away" from the player (the pitch) will pass the correct rotation until it hits 90 degrees, where past that, the rotation will be mirrored on the prop's local x axis. I'm not sure if this is Source Engine's way of preventing gimbal lock or what. Any help is appreciated.
You could try to look for the prop's LocalToWorldAngles, which converts the local entities angle to a world angle.
I'm assuming this is the same issue as I'm experiencing here. This object's collision appears to be inverted from its visual model.
Worth asking - have you tried composing the rotation in a different order? The final rotation depends on the order you apply pitch, yaw, and roll, even if the individual values are identical. It's worth trying all six different ways of ordering the rotations to see if one of them matches.