How do I set the angle for bullet behavior?

0 favourites
  • 8 posts
From the Asset Store
3D Car Pack 1
$1.80 USD
40% off
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • I've encountered an interesting problem I can't solve for some reason. As you can see on the image below, in this function I pick all of the instances of the "babu" object which fulfill the expression and for each of these, I set 2 coordinates from an array (the object has another 2 coordinates already stored in the kezdo_X and kezdo_Y instance variables).

    After that, I try to set the angle of motion for the bullet behavior using the angle() expression with these 4 coordinates. The problem is, that the angle will always be either 0 or -180 in the behavior (checked in debug mode). However, the coordinates gets loaded into the variables just fine, and when I write out the angle() expression's result, it displays the correct angle. Is this some problem with the behavior I don't know about? I've already tried using int() before the angle() expression, and using the custom movement behavior I get the same results.

    Any help would be appreciated. Thank you.

  • I recently encountered the same problem. The issues seemed to be related to the particular layer that I was using. All of my layers did not have the same parallax value. I didn't really understand why that was causing the problem but I tried changing the layer that the object using the bullet behavior was using and then it worked fine. I don't know if that is the issue for you and it may be a bug with the latest stable release. I was unable to replicate it to report it as a bug and I encounter the problem twice in the last week. Just thought I'd share that with you

  • TheDom I figured out that if you set the angle with speed 0, it ignores it. I'm not sure that this is how it should work, so I filed a bug report:

  • have a look at

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • RamPackWobble Thanks, now I see why it behaves like that.

  • After another look - try swapping the set speed to above the set angle or look at using set angle rather than set angle of motion.

  • For the "set angle of motion" action to work, you need to first set the speed of movement > 0.

  • Kyatric

    Yes, I realized it earlier today (but still, thanks), nonetheless I didn't find any information about this in the manual, which would be useful in my humble opinion.

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