How to offset the point at which shapes are created. #1324
Replies: 1 comment 3 replies
-
Wrap your |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, the models in my program have a TransformComponent that has variable Translate as its origin. This is passed into Jolt to create the shape. However some of the origins for the models are not at the center of the model, some are on the surface for example. This causes the collision box created to be offset from the actual model.
Here you can see that the collider is offset in the Y axis.
And here is the floor rotated 180 to show that the size of the collider is correct just the origin is wrong.
I was able to calculate the center of the model by using min and max extents and with that was able to calculate the offset from Translate to modelCenter.
How can I change the origin of the collider in Jolt.
Beta Was this translation helpful? Give feedback.
All reactions