Dividious
Member
Got a scenario that I cant solve...
top down game
wasd controls the bottom image of a man
mouse controls the top image of a man
i want to be able to code where i have the mouse to the right of the player, so he's looking right as well as the bottom half also facing right.... but if i push down on "S" and keep the mouse to the right of the player character then the lower half will slightly rotate to walk down but be locked within a certain degree of the top half facing direction. i'm using motion_add() for movement.
its similar to this video:
however i want the "tank" to be moved via wasd and the "turret" to be moved via mouse, and the tank to be locked to the turret. unlike the video where the turret is locked to the tank.
see image for example:
any help would be appreciated
top down game
wasd controls the bottom image of a man
mouse controls the top image of a man
i want to be able to code where i have the mouse to the right of the player, so he's looking right as well as the bottom half also facing right.... but if i push down on "S" and keep the mouse to the right of the player character then the lower half will slightly rotate to walk down but be locked within a certain degree of the top half facing direction. i'm using motion_add() for movement.
its similar to this video:
see image for example:
any help would be appreciated
Attachments
-
6.9 KB Views: 8