Skip to main content
gamedev.net
🔒 Locked

Direction Angle

Started by suckxez Sep 17, 2005 at 6:37 PM 1 replies 650+ views
Original Post
suckxez
suckxez
ok I've got a central point, a player, who fires bullets. Now... i want those bullets to aim at the player's mouse-click. they do when i give over the mousecoords to the direction vector but the particle/bullet speed depends on how far the mouse is away from the Player/Centre. I guess I need something that calculates a angle from the mousecoords and converts those to a direction vector. but i don't know how to do that :( ideas? I talk about 2d... thanks
The Rug
The Rug
Hi, take a look at this thread from earlier today, it might help [smile] (The theory there is the same, just forget about the z component)
the rug - funpowered.com
suckxez
suckxez
great!

thank you! :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.