JoEngine: sample of 3d collision?

Hi everyone !
I would like to ask you guys if is there a sample/example of a simple 3d collision using Jo Engine to help newbies to understand how to do that.

Thanks in advance
 

Ponut

Gear Supporter
It's relatively simple to do a axis-aligned box collision

First, you need to define the X, Y, Z radius of each object (size)

Then define the position of each object

Then get the absolute distance from each object to each other object in X,Y,Z (xd = JO_ABS(x1 - x2) etc).

Then you know if any object's distance to the other object minus the radius of both objects is less than 0, they are colliding.
 
It's relatively simple to do a axis-aligned box collision

First, you need to define the X, Y, Z radius of each object (size)

Then define the position of each object

Then get the absolute distance from each object to each other object in X,Y,Z (xd = JO_ABS(x1 - x2) etc).

Then you know if any object's distance to the other object minus the radius of both objects is less than 0, they are colliding.

Thanks for your answer.
If you have or can provide a small .c example I would appreciate a lot.
 
Top