Cuddlefish's Forum Posts

  • 2 posts
  • Thanks for all the responses! I used this solution and it works like a dream. I went one step further and stored the angle as an instance variable too for easy access.

    To calculate an objects angle of motion, create 2 instance variables for the object called 'PreviousX' and PreviousY'

    at the end of your events add

    Every Tick -> Object: Set PreviousX to X

                  Object: Set PreviousY to Y

    Then to calculate the objects actual angle of motion use Angle(Object.PreviousX,Object.PreviousY,Object.X,Object.Y)

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've got a bit if a conundrum.

    I would like objects when they collide with bullet behaviour to bounce off each other. I am using there current Angle of Motion plus 180 degrees.

    This works well until I introduce solid objects, once they bounce then I am think that the angle of motion is no longer the angle they are actually going at.

    Am I correct? If so is their anyway of accessing there actual angle of motion?

    Thanks

  • 2 posts