if you use newton physics engine then object whitch collide calls a newton callback, in the callback you can also write what to do for a model when it collide. about geting a point of collision i dont know, havent tried
Yup, Irrlicht's collision detection is very basic and doesn't support collision between scene nodes in this manner, at least that I know of. I mentioned in another post. Here is a linky. http://irrlicht.sourceforge.net/phpBB2/ ... highlight=
kburkhart84 wrote:Yup, Irrlicht's collision detection is very basic and doesn't support collision between scene nodes in this manner, at least that I know of. I mentioned in another post. Here is a linky. http://irrlicht.sourceforge.net/phpBB2/ ... highlight=
doesnt irrlicht has at last some function to return the name of scene node is coliding with the other? the exact point doesnt matter to much...
i need to check if the player is hitting a cube from underneath (its a "?" mario-like block) and what block is the player hitting (the bricks block or the yellow "?" block for example)
You could cast a short ray straight up from your character, and use it to select the bounding box of a node (use a bitmask for bounding box selection).
This is assuming you're doing a 3d project. I don't know how to do it in 2d, although it may be something similar.
Check the collision tutorial on using a Ray, and then search the forums for ID Bitmasks.
Phant0m51 wrote:You could cast a short ray straight up from your character, and use it to select the bounding box of a node (use a bitmask for bounding box selection).
This is assuming you're doing a 3d project. I don't know how to do it in 2d, although it may be something similar.
Check the collision tutorial on using a Ray, and then search the forums for ID Bitmasks.
That seems like it would work as well. Also, if world is 3d but gameplay 2d, then there wouldn't be a difference, but if you are using sprites, as in fully 2d, then collision detection suddenlky gets big changes...
Phant0m51 wrote:You could cast a short ray straight up from your character, and use it to select the bounding box of a node (use a bitmask for bounding box selection).
This is assuming you're doing a 3d project. I don't know how to do it in 2d, although it may be something similar.
Check the collision tutorial on using a Ray, and then search the forums for ID Bitmasks.
good idea... i will try this
but i thought that irrlicht has a easier way to detect collided scenenode´s name, id, pointer or whatever...
and if i write my own code i will post it on Code snipets