I'm looking to make my character attack and I want him to slightly move towards whatever he is attacking when the left mouse button is clicked. However when I have it set up like in the image it only moves right no matter where the mouse is located on the screen.
Develop games in your browser. Powerful, performant & highly capable.
set bullet angle of motion to: angle(player.x, player.y, mouse.x,mouse.y)
It's not correct put mouse position there in bullet angle of motion. Put angle as an input by calculating angle between player and mouse position. Set it like Angle(player.X, player.Y, mouse.X, mouse.Y) or reverse Angle(mouse.X, mouse.Y, player.X, player.Y).
Thank you guys its working now!