Code: Select all
if love.keyboard.isDown('r') then
player.x = height/2
player.y = width/2
player.XYspeed.X = 0
player.XYspeed.Y = 0
player.deg = math.pi
end
Code: Select all
if love.keyboard.isDown('r') then
player.x = height/2
player.y = width/2
player.XYspeed.X = 0
player.XYspeed.Y = 0
player.deg = math.pi
end
Code: Select all
degrees = math.deg(math.pi)
radians = math.rad(degrees)
Code: Select all
velocityX = math.cos(headingInRadians)*velocity
velocityY = math.sin(headingInRadians)*velocity
Users browsing this forum: Bing [Bot] and 8 guests