[BEHAVIOR] Polar Coordinates

0 favourites
  • 6 posts
  • DOWNLOAD: https://drive.google.com/open?id=0B2mWg ... 0NQOTNGbG8

    Polar Coordinates behavior

    It allows you to use polar coordinates instead of orthogonal coordinates (regular X,Y)

    Properties:

    • OriginX
    • OriginY
    • DeltaX (aka the distance to the Origin)
    • DeltaY (aka the angle)
    • Status (Enabled or Disabled)

    ACES:

    Actions:

    • Set Origin
    • Set Delta Position
    • Set Enabled
    • Update

    Conditions:

    • Comapre Origin
    • Compare Delta Position
    • Is Enabled

    Expression:

    • Origin
    • Delta Position
    • Status

    DOWNLOAD: https://drive.google.com/open?id=0B2mWg ... 0NQOTNGbG8

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That is exactly what i missed for a long time. Ima snap this tomorrow.

  • Tell me if you see anything wrong or that I could do better

  • Oh i am happy with it as it is (how it works).

    I would like to suggest other names, to give it more an intuitive 'polar feeling'. But that is up to you.

    .OriginX i would name .PoleX / .PoleY. "Pole" is mostly used to point to that point. (i think)

    .DeltaX i would name .Radius

    .DeltaY i would name .Azimuth. "Angle" is taken. And Azimuth means the angle to a reference angle.

    You could add that 'reference angle' (the polar axis, up to you), but i guess that will complicate things for most users. Everyone is used to zero angle as reference.

    Say you have two objects under an angle(x1,y1,x2,y2)

    Say we can set an expression .ReferenceAngle to that angle. (or leave it to a default zero)

    Then we can set .Azimuth with .ReferenceAngle as the angle from where .Azimuth starts to rotate from.

    Now we can easily go along with rotated coordinate systems.

  • I would like to suggest other names, to give it more an intuitive 'polar feeling'. But that is up to you.

    .OriginX i would name .PoleX / .PoleY. "Pole" is mostly used to point to that point. (i think)

    .DeltaX i would name .Radius

    .DeltaY i would name .Azimuth. "Angle" is taken. And Azimuth means the angle to a reference angle.

    Well the Origin X and Y designate the position of the origin of the polar coordinates (aka the point (0,0)), so I think it's better named that way.

    I could name DeltaX and DeltaY, Radius and Angle for clarity purposes. Also the "Angle" is not necessarily taken as it will be Object.PolarCoordinates.Angle

    You could add that 'reference angle' (the polar axis, up to you), but i guess that will complicate things for most users. Everyone is used to zero angle as reference.

    Say you have two objects under an angle(x1,y1,x2,y2)

    Say we can set an expression .ReferenceAngle to that angle. (or leave it to a default zero)

    Then we can set .Azimuth with .ReferenceAngle as the angle from where .Azimuth starts to rotate from.

    I understand what you mean but I don't think that's really useful. The purpose of the plugin is to allow the use of polar coordinates, not make the act of polar rotation easier. However, you can make that pretty easily, as you can see in the two example capx.

    And you can set the "Start" angle from the editor in the behavior's parameters, so it's kinda similar to what you want.

  • UPDATE:

    Renamed DeltaX and DeltaY to Radius and Angle.

    Added CarToPol and PolToCar expressions to convert Carthesian to Polar and vice versa.

    Same download: https://drive.google.com/open?id=0B2mWg ... 0NQOTNGbG8

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