anpur's Recent Forum Activity

  • Hello,

    I'm totally support decision to limit url posting, but it really hurts that it's impossible to refer C2 manuals and this forum threads itself.

    So, if forum engine has this feature. it would be great to have an exception for them. I can't see any flaws there.

  • Hi!

    I faced this issue and solved it in my way.

    I want to share my solution for someone who needs it and ask, maybe simplest solution available.

    Comparing 8Direction.MovingAngle to other angle I found that it differs, top part of it has negative angles.

    To convert it to normal angle I've done following:

    (Player.8Direction.MovingAngle + 360) % 360[/code:iz491a9i]
    
    So, for example, -45º is converted to 315º, etc.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I found this thread looking how to calculate smallest difference between two angles

    (like this atan2(sin(x-y), cos(x-y)) )

    .

    If you're looking for same thing just use awesome embedded construct function:

    // returns the smallest difference between two angles
    anglediff(a1, a2)
    [/code:13gy8ef2]
    
    Unfortunately, I don't have enough reputation to post url to "System expressions" Construct 2 reference page
anpur's avatar

anpur

Member since 30 Jan, 2015

None one is following anpur yet!

Connect with anpur

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies