Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoveTo along timeline path behavior: SetAngle breaks in higher speeds. #8354

Closed
rozpustelnik opened this issue Dec 12, 2024 · 2 comments
Closed
Assignees
Milestone

Comments

@rozpustelnik
Copy link

rozpustelnik commented Dec 12, 2024

Problem description

Object with MoveTo behavior following timeline path (bezier) does not yield right angles of motion when used in speeds exceeding 1500.

Attach a .c3p

movetoTest.zip

File attached.

Steps to reproduce

  1. Run file.
  2. Press button with "speed 1500". Fish gets the right angles from angle of motion (derived from timeline bezier path).
  3. Press button with "speed 1600". Fish is not updated with angle of motion anymore or is given wrong angles.
  4. Alternatively -> disable the actions in event sheet (line 2) regarding adsjusting angle of fish object to angle of motion and turn on Set Angle in MoveTo behavior. This doesn't work as expected either.

You may want to zoom out the layout view to see the objects. This is re-created setting of my game's layout.

Observed result

If MoveTo speed exceeds 1500, angle of motion readings break.

Expected result

Angle of motion should be giving right angles independently from speed.

More details

Tested on Windows. Edge and Chrome.

Affected browsers/platforms:

First affected release:
N/A

System details

View details

PASTE HERE

@AshleyScirra
Copy link
Member

@DiegoScirra - this looks related to your code for following beziers. I think the problem is this creates lots of waypoints, and when it reaches a waypoint in a tick, it doesn't update the moving angle; when the speed is high enough it is reaching a waypoint every tick. However there appears to be further inconsistencies: the 'Set angle' setting is meant to just automatically do 'Set object angle to the moving angle', but the behavior appears to have a completely different calculation for 'Set angle' when following a bezier. Using an event sheet to always set angle to the moving angle should work the same as the 'Set angle' setting. I'm not sure what the best way to handle this is - perhaps following a bezier should just set the moving angle to the angle from the previous tick's position to the current position.

@DiegoScirra DiegoScirra added this to the Next beta milestone Dec 20, 2024
@DiegoScirra
Copy link
Collaborator

Will be fixed in the next beta release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants