• Create Account

Need scary sound effects or creepy audio loops for your next horror-themed game? Check out Highscore Vol.3 - The Horror Edition in our marketplace. 50 sounds and 10 loops for only \$9.99!

### #Actualtheo2005

Posted 17 April 2012 - 01:34 PM

Add MoveX and MoveY to LookAtX and LookAtY. As it stands you're positioned a ways away from the world origin and looking at a point that revolves around the origin.

Try this thought experiment: draw a circle on the floor. Now stand 10 feet away, and watch an ant walk around the circle. The effect should resemble what you're seeing in your code.

Wow, that actually fixed the movement problem that I didn't even mention here. But the mouse problem -- it goes back and forth when I turn away from the object. If I turn left, it will go left and after a certain point it will start going back until it reaches that certain point on the right side. So it keeps going like this:

oooooooXoooooooo
<--------------------->o
oooooooooooooooo

X being the object and the line the point where the camera looks at. The point is that it will never see the X that would be on the other side of the line, let alone make a 360 turn and see the object first from the other side.
('o' dont have any meaning here, I couldn't get the X to be in the middle)

### #2theo2005

Posted 17 April 2012 - 01:33 PM

Add MoveX and MoveY to LookAtX and LookAtY. As it stands you're positioned a ways away from the world origin and looking at a point that revolves around the origin.

Try this thought experiment: draw a circle on the floor. Now stand 10 feet away, and watch an ant walk around the circle. The effect should resemble what you're seeing in your code.

Wow, that actually fixed the movement problem that I didn't even mention here. But the mouse problem -- it goes back and forth when I turn away from the object. If I turn left, it will go left and after a certain point it will start going back until it reaches that certain point on the right side. So it keeps going like this:

			  X
<--------------------->


X being the object and the line the point where the camera looks at. The point is that it will never see the X that would be on the other side of the line, let alone make a 360 turn and see the object first from the other side.

### #1theo2005

Posted 17 April 2012 - 01:33 PM

Add MoveX and MoveY to LookAtX and LookAtY. As it stands you're positioned a ways away from the world origin and looking at a point that revolves around the origin.

Try this thought experiment: draw a circle on the floor. Now stand 10 feet away, and watch an ant walk around the circle. The effect should resemble what you're seeing in your code.

Wow, that actually fixed the movement problem that I didn't even mention here. But the mouse problem -- it goes back and forth when I turn away from the object. If I turn left, it will go left and after a certain point it will start going back until it reaches that certain point on the right side. So it keeps going like this:

X
<--------------------->

X being the object and the line the point where the camera looks at. The point is that it will never see the X that would be on the other side of the line, let alone make a 360 turn and see the object first from the other side.

PARTNERS