Orbit only works clockwise -- why not counter clockwise?

From the Asset Store
Make a displayed number gradually increase or decrease, making an impression of a real-time counting.
  • Is there a way to make orbit work counter clockwise?

    Tagged:

  • Set the speed to a negative number

  • hmm, i tried that but it didnt work .. perhaps it was overwritten in the code

  • Yes -- it was overwritten by the code -- i thought it only works clockwise.

  • Looks like when i enter speed as negative and activate match rotation, then the sprite is turned around -- i.e. the vehicle now drives around in reverse.

    I think this is a side effect of working around the counter clockwise with negative speed.

    Better, if orbit has a dedicated boolean to specify circling direction -- clockwise or counter clockwise -- so that one doesnt need to rely on negative speed.

    I guess one work around is to create two opposite frames -- and upon entering the circle with negative speed switch to the other frame.

    hopefully in the future orbit will get real booleans to specify direction

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just did that work around and, by switching to the horizontally flipped frame, the vehcile doesnt change direction due to negative speed -- however, the frame change is felt visually -- so its not an optimal solution.

  • You can set the sprite to mirrored if the orbit speed is less than 0.

    But I think that this is a bug as the intended behaviour is > sets the object's angle to match the direction of travel in the orbit.

    You should make a bug report

  • Good idea.

    Now that i think of it, its actually a bug.

    First, i thought its a feature request, but i think you are right, its a bug.

    Hmm, where do you file a bug report.

  • Hmm, where do you file a bug report.

    github.com/Scirra/Construct-3-bugs/issues

  • thanks

  • i try behavior orbit, clockwise and counter clockwise with positive and negative speed number and it's work

  • Hi,

    Thank you for trying this out.

    Try to activate match rotation and use a sprite image where you can see the forward direction.

    You will notice that when you set speed to a negative number and activate matching rotation the sprite image is inverted making it drive backwards.

  • The sprite is not mirrored if you use a negative rotation speed. It just uses the same angle as if it had a positive rotation speed.

    I believe this is by design as it matches other features in Construct, like the Platform behavior. If you intend to flip the direction of the sprite, you can use the 'Set mirrored' action. For example a typical platform game will use the 'Set mirrored' action as the player presses the left and right movement keys - the behavior does not control that for you.

  • Ashley Fair enough, but perhaps the documentation for "Match Direction" needs an update because it is at odds with the result.

    If enabled, sets the object's angle to match the direction of travel in the orbit. If disabled the behavior only changes the object's position without affecting the angle.

    If the object is travelling in an anti-clockwise orbit, the documentation states that the object angle will match the direction of travel, which it doesn't.

  • The sprite is not mirrored if you use a negative rotation speed. It just uses the same angle as if it had a positive rotation speed.

    I believe this is by design as it matches other features in Construct, like the Platform behavior. If you intend to flip the direction of the sprite, you can use the 'Set mirrored' action. For example a typical platform game will use the 'Set mirrored' action as the player presses the left and right movement keys - the behavior does not control that for you.

    Hi Ashley,

    I now got the code to work using set mirrored action -- however, quite like my earlier work around -- where I set a flipped frame, to rectify the flipped image -- the set mirrored is visually noticeable by making the sprite blink.

    I still believe that there is a case for having a dedicated property for orbit action to make it circle counter clock wise without the need for negative speed (which is semantically unclear) and related work-around.

    If this clashes with platform behavior then perhaps the design there is not optimal either.

    And, if two designs need to co-exist, the perhaps two orbit plugin variants are needed -- or a third property that establishing default behavior such as now, and counter clockwise behavior such as I now need for here.

    The way it is now, its unfortunately, not usable since it significantly reduced the visual quality of the end results.

    It would be a pity if due to that i need to try to work things out with vector math, which has its own problems (e.g. how to set and adjust speed consistently across computers, if speed is angular displacement).

    And, overall -- what I really like about C3 is that it makes such things really simple to do -- so, just to get counter clockwise orbit -- shouldn't require one to drop down to complex circular vector math.

    u.pcloud.link/publink/show

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