Code: Select all
node.Rotation.RotationToDirection(camera.Target)
node.Rotation.RotateYZby(45)
Edit: i dont use the two functions together btw and I also tried the rotate via a vector. I cant see a way to bypass this with matrices and why are these functions not working properly? What am I doing wrong?
Code: Select all
Dim node As AnimatedMeshSceneNode = smgr.AddAnimatedMeshSceneNode(mesh, Nothing, 2, New Vector3Df(60000, 0, 60000))
If node <> Nothing Then
node.SetMaterialFlag(MaterialFlag.Lighting, False)
node.SetMD2Animation(AnimationTypeMD2.Wave)
node.SetMaterialTexture(0, driver.GetTexture("dwarf.jpg"))
node.SetFrameLoop(1, 13)
node.AnimationSpeed = 15
node.Scale = New Vector3Df(3)
node.Rotation.RotationToDirection(camera.Target)
node.Rotation.RotateYZby(45)
End If