How can I make projectiles (bullets) travel at an angle?

I think I have the right idea, just my calculation is wrong … or I am fully wrong.

playerangle is the angle the player is at :wink:
I thought I could transfer the angle of the player to a gradient, hasn’t worked.
[lua]
local bullet = display.newCircle(player.x+10,player.y, 10)
physics.addBody(bullet, {filter = bulletFilter})
bullet:setFillColor(255,0,0)
bullet:setLinearVelocity( math.tan(playerangle), 1 )
transition.to(bullet, {time = 1000, onComplete = function(self) self.parent:remove(self); self = nil; end })[/lua]

[import]uid: 79135 topic_id: 15234 reply_id: 315234[/import]