Discord
Login
Community
DARK THEME

Collision help?

hey guys i am making a tank game so my controls are on computer down, up, left, right and i want to add sprite rotation like when you move left rotate my sprite slowly how can i do that?

setDrawRotation

screen.setDrawRotation(45)
screen.setColor("red")
scrren.drawRect(0,0, 100, 100)

It moves my map not sprite

screen.setdrawRotation(0)
screen.drawMap( "name_map", map_x, map_y, ....)
screen.setDrawRotation(45)
screen.setColor("red")
scrren.drawRect(0,0, 100, 100)

screen.setDrawRotation affects all drawing that comes after it. Similar to what @Loginus said:

/* ... */
screen.setDrawRotation(player.rotation)
screen.drawSprite("player", player.x, player.y)
screen.setDrawRotation(0)
/* ... */

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community