Add optional rotation support to createColCuboid#4732
Open
PrimelPrime wants to merge 2 commits intomultitheftauto:masterfrom
Open
Add optional rotation support to createColCuboid#4732PrimelPrime wants to merge 2 commits intomultitheftauto:masterfrom
PrimelPrime wants to merge 2 commits intomultitheftauto:masterfrom
Conversation
FileEX
requested changes
Feb 28, 2026
Comment on lines
+7510
to
+7511
| CVector vecRotationRadians = vecRotation; | ||
| ConvertDegreesToRadians(vecRotationRadians); |
Member
There was a problem hiding this comment.
Since it takes the vector by reference, what’s the point of creating a new vector?
| SizeChanged(); | ||
| } | ||
|
|
||
| void GetRotationRadians(CVector& vecRotation) const override { vecRotation = m_vecRotation; } |
| } | ||
|
|
||
| void GetRotationRadians(CVector& vecRotation) const override { vecRotation = m_vecRotation; } | ||
| void SetRotationRadians(const CVector& vecRotation) override |
Comment on lines
+75
to
+77
| const float cx = cosf(rx), sx = sinf(rx); | ||
| const float cy = cosf(ry), sy = sinf(ry); | ||
| const float cz = cosf(rz), sz = sinf(rz); |
Comment on lines
+42
to
+44
| const float cx = cosf(rx), sx = sinf(rx); | ||
| const float cy = cosf(ry), sy = sinf(ry); | ||
| const float cz = cosf(rz), sz = sinf(rz); |
Member
|
Don’t you want to add this argument for the server side as well? Currently, this PR only adds the ability to set the rotation on the client side. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional rotation support to createColCuboid. The cuboid now stores a ZXY Euler rotation and uses OBB hit detection if a rotation is set otherwise returns to default AABB hit detection.
Motivation
Cuboids previously only supported axis-aligned bounding boxes (AABB), making it impossible to accurately represent rotated structures without workarounds e.g. overscaling cuboids or using colspheres which arent accurate enough in certain use cases.
Test plan
Checklist