Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Top-down 360 degree shooting

Years of Service
User Offline
Joined: 5th Oct 2007
Posted: 11th Oct 2013 02:19
I'm stumped and am curious as to how to make my sprite fire bullets towards the mouse.

The sprite already rotates with the mouse depending on it's position on screen.

How would I make it so that when I click a bullet is fired the mouse's direction?

Also, how would I use a dual joystick controller to accomplish the same feat? Example (Robotron)

AMD FX 6300 hex-core processor 3.5 GHZ
16 GB DDR3 ram, Geforce 660 Ti 2GB ram
DBPro Master
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Oct 2013 06:31
Here's some commented code for ya:

Login to post a reply

Server time is: 2024-03-02 06:30:34
Your offset time is: 2024-03-02 06:30:34