Topic: Hello i'am new here'
Hello i'am new here.
I like the irrlicht wrapper.
Can anyone help me? Iam searching a code snipp for a 3d object move in irrlicht.
'-------------------------------------------- MAIN ----------------------------------------------------------------------------
While (device.Run())
timer:+MilliSecs()
timer = MilliSecs()
Driver.BeginScene(True, True, Null) 'SColor.createFromVals(0,200 , 200 , 200))
str = "LastMousPosition= "
str = + lastmousepos.getY()
device.setWindowCaption(str)
c = boxnodgr.GetPosition()
d = boxnodgr.GetRotation()
If Keys = 1 ' key W
c.setX(c.getX() + (3 * Cos((d.getY()) * 3.14 / 180)))
c.setZ(c.getZ() - (3 * Sin((d.getY()) * 3.14 / 180)))
End If
' .... analog key S
If Keys = 4 ' key A
d.setY(d.getY() - 5) ;
End If
boxnodgr.SetPosition(c)
boxnodgr.SetRotation(d)
smgr.drawAll()
driver.endScene()
keys=0
Wend
'-------------------------------------------- MAIN ----------------------------------------------------------------------------
my code do not work.
i can move in x,z . But when i rotate my object i move in x,y way, not to the way where i have rotate it.
Sorry for my bad english......