simple collision detetion without rays

Sjinta

29-10-2010 12:25:03

i need to find a way to detect if i bump into another collision object. Since i just went on programming with the 9th demo. I dont really know much about it yet.
I have found out how to detect collision with rays, but i dont want to have to make a gazillion rays to check if i bump into an object from any angle.
I also need to know if its a specific object not just if I hit "something"

cheers
Sjinta

koirat

29-10-2010 14:20:21

You can perform collision test with specified collision shape and all the shapes in the newton world.

SFCBias

06-11-2010 13:09:18

Using collision callbacks you can check against the type of primitive with the specified ID you gave at the collision of that body's creation.

Sjinta

11-11-2010 11:03:45

i have not found how to yet, so atm i made my own funtion that looks something like this: if(posBodyA-posBodyB < distance) collision.
very basic, but it works okish