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

2014/5/21

Changing the origin of shoot to something a little higher.

FrostRyan FrostRyan

2014/5/21

#
Hi guys, I'm learning a lot while trying to make a game, but I'm stuck here on the Mover class. The bullet.move(40) just changes the origin on X, I want to change on Y. This video doesn't explain how so I came here for help, remember I'm super noob so explain like I'm five. Thanks in advance.
Zamoht Zamoht

2014/5/21

#
When you add the bullet object you should add some thing to the y value: getWorld().addObject(bullet, getX(), getY()+a); Set a to what ever you like. Remember that a should be negative if you want the bullet's origin to be higher on the screen.
FrostRyan FrostRyan

2014/5/21

#
Lol, wtf I tried it before and didn't work, but now works perfectly, thanks :) got it now.
You need to login to post a reply.