Camera rotation using mathgl

62 views
Skip to first unread message

Some-Punk

unread,
Oct 8, 2014, 10:20:41 PM10/8/14
to go...@googlegroups.com
How do I rotate the camera matrix produced by mgl32.LookAtV?  My math is very rusty about these things.

Currently translation on the xz plane is just fine:


 world
.Camera = mgl32.LookAtV(mgl32.Vec{10,0,0}, mgl32.Vec3{0, 0, 0}, mgl32.Vec3{0, 0, 1}
 
...
 world
.ShiftX += dX * dTime
 world
.ShiftZ += dZ * dTime
 world
.Camera = mgl32.Translate3D(float32(world.ShiftX), 0, float32(world.ShiftZ)).Mul4(world.Camera)


I just would like to know how to rotate the Camera post translation.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages