Making a bullet shoot from the sides of a rotating shooter.

Questionable

  • Posts: 3
A bit of an odd request, but I'm making a Space shooter and I want to be able to shoot bullets from the right and left sides of the ship. The problem is my ship moves toward the mouse and so it rotates.

I'm having trouble explaining so here is a attached image explaining the problem better.

Joe

  • *
  • Posts: 2480
Welcome to Stencyl!

You'll need to factor in your ship's orientation when you set the bullets' velocities. Can we see the Behavior you're using now?

Questionable

  • Posts: 3
This is probably a horrible shooting method, but I just use "Spawn Actor".

When I press left, my ship sends the message "west" to Spawn Actor. The bullet is spawned.
Likewise for right. The only diffence is the initial x-velocity and trigger.

Attached is the Spawn Actor behavior, and the Move Toward Mouse behavior.

(Also sorry for the late response.)

Questionable

  • Posts: 3
I believe I've figured it out.

I modified the Fire Cannon behavior from StencylForge. I added an attribute called IntAngle(it can be called anything really). This attribute can then be adjusted in the Actor Behavior menu to change the firing direction.

The attribute is circled in attachment.