J
jaber
Guest
Hi all : )
I am facing some troubles with implementing the right direction of the lower part of my charachter (feet steps).
I can move the player in all directions and I am using Keyboard combination (A,D,W,S) with mouse pointer for that.
I am using hspeed and vspeed to move the player and everything is working perfectly.
sofar, I am only using one sprite (step_forward) for the foot steps no matter what direction I move the player… but actually I should be using the following additional sprites
step_right
step_left
my problem is, I am not good with vectors and could not solve this puzzle How can I properly make use of the other sprites (right and left) in regard to player direction (actuall movement direction) ?
I think step_right and step_left sprites should be used whenever the actuall player movement is perpendicular (or almost perpendecular) to the player direction... below u see an example of when should step_right be used
sofar I can think of
point_direction(obj_player.x, obj_player.y, mouse_x, mouse_y) (as player direction vector)
built in variable direction (as plyer direction which output the valuse I wrote in the photo below when I use keyboard A,S,D,W )
I think Image_angel is not the right thing to be used because it store values beyon the range (0,360)
but as I said, I am just confused and lost and looking for some advice/help
thanks in advance
cheers!
I am facing some troubles with implementing the right direction of the lower part of my charachter (feet steps).
I can move the player in all directions and I am using Keyboard combination (A,D,W,S) with mouse pointer for that.
I am using hspeed and vspeed to move the player and everything is working perfectly.
sofar, I am only using one sprite (step_forward) for the foot steps no matter what direction I move the player… but actually I should be using the following additional sprites
step_right
step_left
my problem is, I am not good with vectors and could not solve this puzzle How can I properly make use of the other sprites (right and left) in regard to player direction (actuall movement direction) ?
I think step_right and step_left sprites should be used whenever the actuall player movement is perpendicular (or almost perpendecular) to the player direction... below u see an example of when should step_right be used
sofar I can think of
point_direction(obj_player.x, obj_player.y, mouse_x, mouse_y) (as player direction vector)
built in variable direction (as plyer direction which output the valuse I wrote in the photo below when I use keyboard A,S,D,W )
I think Image_angel is not the right thing to be used because it store values beyon the range (0,360)
but as I said, I am just confused and lost and looking for some advice/help
thanks in advance
cheers!
Last edited by a moderator: