g64 icon indicating copy to clipboard operation
g64 copied to clipboard

Incorrect prop collision angles

Open ckosmic opened this issue 2 years ago • 3 comments

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.

ckosmic avatar May 31 '22 00:05 ckosmic

You could try to look for the prop's LocalToWorldAngles, which converts the local entities angle to a world angle.

SnowySnowtime avatar May 31 '22 17:05 SnowySnowtime

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. gmod_2022-09-08_05-24-30

sndrec avatar Sep 08 '22 09:09 sndrec

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.

sndrec avatar Sep 15 '22 20:09 sndrec