Hey all...
I'm working on a 3rd person style camera, but I have a problem.
I have it set up so the mouse controls the player object's Y axis rotation, and the camera rotates with it, which works fine... but I can't figure out how to make the camera rotate around the object's X axis... at the moment it simply rotates around it's own X axis, meaning the player object doesn't stay in view. Here is the code I have so far...
function MoveCamera()
NewObjY# = wrapvalue (object angle y(100) + mousemovex() * 0.4)
CamAngX# = wrapvalue (camera angle x() + mousemovey() * 0.4)
yrotate object 100,NewObjY#
yrotate camera NewObjY#
xrotate camera CamAngX#
position camera object position x(100)-sin(object angle y(100))*8, object position y(100)+8, object position z(100)-cos(object angle y(100))*8
position object 100, object position x(100),get terrain ground height(1,object position x(100),object position z(100))+0.7, object position z(100)
endfunction
I've been looking at EZrotate Enhanced, and it sounds like the Orbit command is what I need, but I'm not really sure how to incorporate it...
Can anyone give me any advice?
"You have to be 100% behind someone to stab them in the back..."