Hello,
I would like to know how can we detect collisions with ORX?
(Without using the physics calculation engine, just collisions engine). I read posts and found no solution without the physical response.
In fact, I need to create a function like this:
vCorrected = CorrectMoveVect( vMoving, cCollisionShape, &acCollected );
With:
vMoving : the moving hero vector.
cCollisionShape : a shape used by collision ( like Box or sphere )
acCollected : and returned array of colliding objects.
But if you have any other way to do it ...
Thank you for your help and sorry if the answer is already present in the forum.
a++
Numael
Comments
However, you can have the collision separate from the dynamics (the part that makes objects move and react to collisions).
To do so, simply set all your shape with Solid = false in config, you'll get notified for all collisions (contact added and removed with all the info you need, including contact point, normal, shapes in contact, ...) as usual, but no actions will be taken by the engine, up to you to interpret them and act upon them as needed.
Hope that helps!
I imagine that collisions are returned via events ... ?
For one collision add/remove between two objects, only one event is sent, so when listening for a specific object, check both the sender and recipient to make sure you won't miss it.
a++
Numael