Getting variation in angle of motion for bullet behaviour

0 favourites
  • 2 posts
From the Asset Store
Complete the collection by purchasing Motion Universe Pt. 2
  • Basically, I have it where a ball (via bullet) follows the same angle of motion when bouncing off another object. Even if the ball hits a different side of the object. I still want the angle of motion to follow the same kind of arc (for gameplay purposes) but I want to introduce some slight variation (by 5 degrees) into the angle of motion if the ball hits specific areas of the object. Like this:

    Can this be done in bullet behaviour? Perhaps by calling different image points (but what should I bring up in the event panel to do that)?

    EDIT: Forgot to add it, but imagine there being a bounding box around the object. So, dead center bounces out at 285, from the center to the top left at 280 and on the entire left side at 275.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • if you already have the bounce done, and simply want to "add variation", try:

    set angle: Self.Angle + choose(-5,-4,-3,-2,-1,0,1,2,3,4,5)

    It will randomly pick one of the values from choose and will add/withdraw

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