frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Emitter direction

edited November 2013 in General
Hello. I'm playing with having a character that shoots in whatever direction it's moving. Right now, the bullet always fires out to the right (90 degrees clockwise from the direction the character is moving). I've studied Caverns of Delirium for help, but still can't pin down the trouble. Any advice?

http://flowlab.io/game/view/22964

Comments

  • for the emitter, if you click on it, you will see a check box for "match direction"
    It will shoot the direction you are facing, so either have flips or rotations to shoot different ways
  • Thanks. I see a "Match Rotation" checkbox, but not Match Direction. The bullet fires out to the right regardless of if match rotation is checked or not, weirdly.
  • Hey jbpeck,

    You're right, the check box is for "match rotation". What that does is turn the emitted object so that it matches the rotation of the object that is emitting.

    Objects are always emitted in the forward direction of the object emitting them. By default this will be to the right, but you can change the direction the following ways:

    - you can change the default "forward" direction of your object (click on the object, select "edit", then "properties", then select up, down, left or right
    - you can just rotate the emitting object (use the rotate behavior) so that it points the direction you want
    - you can "flip" the object (flip behavior) which will make objects emit the opposite direction
    - you can emit objects with a negative force (in the emitter settings panel), which will also make objects emit the opposite direction

    Hopefully one of these will give you the effect you are looking for, but if you still have trouble try posting a link to your game and I'll try to take a look.



  • Thank you, that was good information about the forward direction property. I've now got what I was going for: arrow keys turn and move the sprite in that direction, and it always shoots forward.

    Really enjoying this platform.
  • Thank you for this! I've needed to know how to make a block emit a coin upwards instead of left or right!
  • Thanks grazer!!!!!
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch