X_COLLISIONRAY

Previous topic - Next topic

Hemlos

Hi Gernot,
scal = X_COLLISIONRAY(1, 0, 0,1000,0, 0, -1, 0)
This returns a number which is fluxuating, shouldnt it be returning 1000?
The object is flat(2 triangle), at Y=0
Bing ChatGpt is pretty smart :O

Kitty Hello

aw, the start point is _on_ the target/intersection plane. Move the target a bit up.
The problem is, I have to build an inverse of the transformation matrix, and multiply your ray with that. Then I do triangle/ray intersection. There might be numerical garbage, so it's always wife to test against a certain "epsilon" noise value.

Hemlos

Ok, i figgured it out....
You have to use the ray when you move the object.

X_MOVMENT with a new position will mess it up.
Bing ChatGpt is pretty smart :O