SOLVED Changing a bullets angle of motion

0 favourites
  • 6 posts
From the Asset Store
Complete the collection by purchasing Motion Universe Pt. 2
  • It should be simple, I'm sure it IS simple, but I'm having an off day.

    I have a bullet that I want to travel at 45 degrees on layout 2. I have a fade effect when transitioning from layout 1 to layout 2, so I only want the bullet to start moving once the fade is complete. To that end, I set the bullet's speed in its properties to 0, then added a 'Fade out finished' event for layout 2, with the actions 'Set bullet angle of motion to 45 degrees' and 'set bullet speed to 150'. Everything works as intended, except for the angle - the bullet just sets off at 0 degrees.

    What seems odd to me, is if I remove the 'set bullet speed' action from the event list, and just put a figure for the speed in the bullet's properties, then it moves at the intended 45 degree angle.

    So how can I get this working?

    Thanks in advance.

    edit: some further notes:

    If I swap 'set bullet angle of motion' for 'set angle' and turn on the option to link object angle with angle of motion in the bullet's properties, then the bullet moves at 45 degrees, HOWEVER I do not want for the sprite to rotate 45 degrees, but to stay upright and only move at 45 degrees.

    edit2:

    SOLVED

    In the bullet's object properties set the desired speed.

    In the event list:

    System -> on start of layout -> set bullet disabled

    fader -> on fade out finished -> set bullet enabled

    fader -> on fade out finished -> set bullet angle to 45 degrees.

  • 'Set bullet angle of motion to 45 degrees' and 'set bullet speed to 150'.

    When the speed is 0, the angle of motion = 0 so you have to set the speed before setting the angle of motion.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • When the speed is 0, the angle of motion = 0 so you have to set the speed before setting the angle of motion.

    Sorry for necroing this thread but I just wanted to bump it up to request this important detail to be included in the manual at

    Bullet Behavior

    Lost a good hour testing and looking at the manual and trying stuff before trying finding it in the forums <img src="smileys/smiley19.gif" border="0" align="middle">

  • Bump (along with an apology for resurrecting) for same request. New to Construct, but spent DAYS trying to figure this out. Was getting unpredictable random results with bullet angle of motion before learning to set the speed first. Would have been awesome if this was in the manual.

  • Had the same issue. But it seems only angles between 0 and 90 are affected.

    I spawned a sprite which is originally used for the HUD display so its speed was set to 0 by default. I used Set angle of Motion 90 (also tried 45 and 0) + Set Bullet Speed. But it always moved to the right (angle = 0). When I set the angle to 180 it moved left! So this could be a little bug when it only affects 0 to 90 degrees?

    Fortunately the search brought up this topic rather quickly.

  • It seems to happen with sprites which have a default Bullet speed as well.

    I spawned a Laser Sprite with default bullet speed of 400 with angle 90 but it moved to the right (angle 0).

    Spawn SPRITE on Layer X

    Set Bullet angle of motion to <0-90> degrees

    The laser default angle is 180 to make it look like coming from above.

    When I add "Set Bullet speed to Y" it still moves to the right.

    /Edit: I had to disable Bullet.SetAngle to make this one work. :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)