This site requires JavaScript, please enable it in your browser!
Greenfoot back
Azzzy24544
Azzzy24544 wrote ...

2018/1/12

Bullet direction

Azzzy24544 Azzzy24544

2018/1/12

#
How do I make my bullets travel in the same direction that my actor is facing
danpost danpost

2018/1/12

#
I think the easiest way is to set it by the actor that creates it:
Bullet bullet = new Bullet();
bullet.setRotation(getRotation());
getWorld().addObject(bullet, getX(), getY());
You need to login to post a reply.