3d move (Irrlicht)

BlitzMax Forums/BlitzMax Programming/3d move (Irrlicht)

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

been trying to get Irrlicht 3de egine to work like blitz 3ds for about 2 days and got fairly far. (most impressive feature: IMouseClick(button:int))

now i'm stuck on a, should be, simple problem, i can't get an 'actor' to move 'forwed' or 'strafft' correctly.

the function goes somthing like this:

method IMove(x:int, y:int, z:int)
     kvector3d = knodehandle.getposition()
     xx = kvetcor3d.getx()
     yy = kvector3d.gety()
     zz = kvector3d.getz()
     kvector3d = knodehandle.getrotation()
     pp = kvector3d.getx()
     yy = kvector3d.gety()
     rr = kvector3d.getz()

    ' x (strafft)
    ' y ('up')
    ' z (forwed)
    xx:+ cos(yy) * z
    yy:- sin(yy) * z
    zz:- sin(yy) * z

    knewpos = createvector3d(xx, yy, zz)
    setposition(knewpos)
end method


the code is above is rubbish but i'm at college and didn't bring the actual code. but the problem is i can't think how to make the 'entity' move Relative to its rotation.

thx for any help.