Pitheos Mar 26, 2013 @ 5:46pm
Movement with mouse
Hi, I am having some issues with mouse movement. I am able to make my avatar either follow the mouse cursor and map the cursor to the mouse pointer. However, I want to be able to have the player control the avatar while making it look natural. Advice? Anyway I can slow down the mouse movement itself for example? I don't want anyone to code things for me, since I would like to learn a lot on my own, unless they point me toward a tutorial. Any help would be appreciated. Thanks for your time.
Showing 1-3 of 3 comments
< >
Pitheos Mar 26, 2013 @ 5:49pm 
Just to clarify, I am making a game with a moth as the main avatar. So I am envisioning slow, gentle movements (much like a 2D flight simulator). If the front of the icon could even point toward the direction the mouse is moving, that would be an added bonus!
EdCoFu Mar 29, 2013 @ 12:01am 
The avatar can move according to WASD, and look at the mouse direction. That's the most natural way i can imagine. This code is very uhm... self-explaining?

direction = point_direction(x,y,mouse_x,mouse_y);

not sure if point_direction() uses the first 2 arguments, if not, theres a (very) simmilar function.
Pitheos Apr 16, 2013 @ 10:56am 
Thank you!
Showing 1-3 of 3 comments
< >
Per page: 15 30 50
Date Posted: Mar 26, 2013 @ 5:46pm
Posts: 3