8 direction - is this a bug or expected behavior?

0 favourites
  • 9 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • I have a sprite I intend to move via the 8direction behavior. I'd like to accelerate that sprite at a given angle for (enemy) movement (e.g. at a 10 degree angle)

    Doesn't work properly, the sprite does not move at a 10 degree angle, instead it goes straight ahead.

    I have another sprite that I wanna impact by an explosion. The explosion also accelerates the sprite at a 10 degree angle (e.g. based on the position to whatever exploded).

    Doesn't work as I'd expect, the sprite only briefly moves in the correct direction, then moves straight ahead instead of at the 10 degree angle.

    It's pretty obvious to me that this happens because the deceleration is applied horizontally and vertically, and not in the opposite direction of the velocity. But I do wonder if this is correct and intended. In any case, it's quite annoying and I have yet to figure out the formula to manually decelerate them the way I want to.

    c3p if you wanna check it out

    wackytoaster.at/parachute/8dirproblem.c3p

  • Doublepost because I can. This decelerates the way I want to (and expect it to tbh) and I have the deceleration of the behavior itself set to 0. So at least there's an easy workaround. But I still wonder if the other behavior is expected, maybe it is, it's the 8 direction behavior, not the 360 degrees smooth movement behavior.

  • Interesting findings,this also means it decelerates faster when moving diagonally? I'll report this as a bug.

  • It seems to be separate issue. Like WackyToaster said deceleration (and after testing also acceleration) is done separately per axis, which gives inconsistent results when moving diagonally.

    This issue also exists when not setting the vector directly

  • Glad to find another thing that will introduce a breaking change to a plugin if fixed :^)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I wonder if official plug-ins should be versioned just like 3rd party one. And have some setting somewhere where you can choose a version of the the official plug-in to use for cases like this where bug fixes or changes might have unintended consequences

  • I wonder if official plug-ins should be versioned just like 3rd party one. And have some setting somewhere where you can choose a version of the the official plug-in to use for cases like this where bug fixes or changes might have unintended consequences

    That would probably be the best way to handle this! The current solution would be to stay limited to the specific editor version, but if there's other stuff and fixes in the newer version you need/want, you're out of luck.

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