Investigate entity position/rotation offsets #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some entities appear slightly offset from their correct position or improperly rotated in the web client. We need to audit the full transform pipeline to find where the discrepancy comes from.
Possible causes
Server side
ICollideable::GetCollisionOrigin()— this may differ from the render origin for some entity typesGetAbsOrigin()vsGetCollisionOrigin())GetCollisionAngles()may not match the visual angles for all entity typesClient side — coordinate conversion
(-Y, Z, -X)sourceAnglesToThreeQuat()may have edge cases'YXZ'and sign flips (-pitch,-yaw,+roll) need verification against Source's actual conventionModel-level offsets
*N) use the brush's origin which may not be at(0,0,0)in model spaceHow to debug
Entity:GetPos(),Entity:GetAngles()) with what the web client receivesprop_physics,prop_dynamic,func_door,playerRelates to
Related: #9 (animation system). Some position/rotation offsets may be caused by missing bone transforms or attachment point data. Worth re-evaluating after #9 is implemented to see which cases resolve and which are genuine transform bugs.