Hello -
As part of my porting of Space Quartz from GameSalad to Corona, I’ve already created various scenes, and now I am focused on the game scene. At this point I have created the buttons and am coding their corresponding code. I have written the code for the left and right buttons; the ship rotates based on button press. I have also written the code for the fire button, but need to work on the “bullet” itself.
I would like the bullet to start off in the angle the ship is facing. I can see (I am printing it in the console!) the ship’s rotation value (ship.rotation), and would like to use that as the bullet’s initial value and have it move forward based on that value. As a matter of fact, that part of code can also help with the ship’s thrust forward regardless of angle (ship.rotation).
In GameSalad you could specify forward movement relative to the object (or the scene, but we’re focused on the object); in this case that’s what would apply. Any ideas as to what commands/arguments I should be looking into?
Thanks, regards.