Replies: 1 comment 4 replies
-
just a thought, are you setting the transform to identity? as
will be picking up the previous state of the transform... |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a struct which contains a model. The struct has a function to update the transform of the model so I don't have to do it manually all the time.
I also have a mesh picking system wherein the world struct sends out a request to all entity structs to check against their own models or anything that I want to include in the selection process.
This works perfectly for models that have { 0 } transforms. Anything else doesn't work.
The collision check is failing at line 3683 of rmodels.c (
if ((u < 0.0f) || (u > 1.0f)) return collision;
)Transform change algorithm: (enttTransform is a struct with 2 Vector3s and a float, not connected to anything)
`
`
Here's how the entity in question deals with the pick request: (This works fine)
`
`
I have gone through step-by-step all 3 algorithms (transform change -> collision check request -> rmodels.c collision check, although I don't understand that one)
Here's how the model's transform looks after the change algortihm: (Scaled down and moved a bit)

It would be greatly appreciated if someone could nudge me in the correct direction,
Pirolye
Beta Was this translation helpful? Give feedback.
All reactions