VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Converting angels .... bren (5 replies, 0 views) (2000-Oct-14) Ok, I've got a camera view, isometric (cam. position is 5,5,5), but now, I made a variable, that keeps track of the angle, called player.angle. To get the right X and Y values for the next move I used this:
Case vbKeyUp
Vscroll = Vscroll + 5 * Sin(Player.angle)
Hscroll = Hscroll + 5 * Cos(Player.angle)
Case vbKeyDown
Vscroll = Vscroll - 5 * Sin(Player.angle)
Hscroll = Hscroll - 5 * Cos(Player.angle)
I thought that would do, but I think it's only correct for a normal top or side view. So what value do I have to add to convert it to isometric view?
|