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

2015/1/20

How to move bullet creation location

1
2
howdoesonecode howdoesonecode

2015/1/20

#
danpost wrote...
It would be better if you explained exactly, in full and in detail, at one time, instead of having us give you what you do not want multiple times before you get what you want.
basically if you can imagine a circle with the circumference of the circle is where the gun is rotating well at the right of the circle is where the bullets are being created yet they are still firing in the direction of the gun the bullet creation stays at the same point on the circle even though the gun is rotating around the circle
danpost danpost

2015/1/20

#
Ok. What you are trying to say without really saying it is that the bullets are being created and placed in the world properly, but they are not moving like they should be. If you look in your bullet class, you will notice that the value of the 'speed' field is never initialized to anything; so, the speed of each bullet created is zero. You need to assign a positive value to the field either when declared or in the bullet constructor code block.
You need to login to post a reply.
1
2