Check what's in front of the object (solved)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
nayon
Posts: 16
Joined: Mon Mar 16, 2009 1:07 pm

Check what's in front of the object (solved)

Post by nayon »

Hi everyone, I have a problem.

I want to check, via getSceneNodeFromRayBB, what is in front of a given scene node. I know the position and rotation of the node (obviously), but for the life of me I cannot calculate what parameters should I pass as the line ending point and beginning points. The line ending point should be a given amount, let's say "dist" amount of units in front of the object in the direction it's facing. The beginning should also be in front of the object as not to collide with the object itself. Can anyone give me a hand here?
Last edited by nayon on Thu May 21, 2009 12:18 pm, edited 1 time in total.
Katsankat
Posts: 178
Joined: Sun Mar 12, 2006 4:15 am
Contact:

Post by Katsankat »

Hi, what part did you not understand in examples/demo ?
nayon
Posts: 16
Joined: Mon Mar 16, 2009 1:07 pm

Post by nayon »

I don't think what I asked had something to do with the examples, but I solved it. I create a vector (1,0,0), then use rotateXZBy to rotate it around the node's rotation, then add it to the position of the node. That's all.
Post Reply