I want to know which model is colliding with the other model and the point that it hits.
how can i do this?
thanks in advance
How can I detect which model give/got the collision?
How can I detect which model give/got the collision?
loading singature...
-
- Posts: 277
- Joined: Thu Dec 15, 2005 6:11 pm
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...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=
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)
loading singature...
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.
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.
-
- Posts: 277
- Joined: Thu Dec 15, 2005 6:11 pm
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 thisPhant0m51 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.
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
loading singature...