Move-to following timeline bezier path with set angle, extreme CPU usage
Problem description
Using the Move-to behavior to follow a timeline bezier path with set angle enabled leads to extreme CPU usage.
Attach a .c3p
Steps to reproduce
- run preview and observe cpu usage
- disable set angle on the move to behavior
- run preview and observe cpu usage
Observed result
with set angle enabled: extremely high CPU usage, for me it's dropping frames with set angle disabled: almost no CPU usage
Expected result
Low cpu usage in both cases. Maybe slightly higher with set angle, as more calculations need to be done, but this is just heavy to an extend where it seems unusable.
More details
Affected browsers/platforms:
First affected release:
System details
View details
PASTE HERE
Just took a quick look and it seems like there are a few places that can be made more efficient, having said that it is going to be more demanding than not setting the angle just because calculating the angle at any given point of a bezier curve, is a bit of pain.
True, but the difference seems extreme here. My naive solution would be getting the paths position slightly into the future and set the angle towards that.
Not sure how applicable this is depending on your implementation: https://youtu.be/aVwxzDHniEw?si=UcdE5aBjRX_weoxP&t=451
The next beta will include a significant performance improvement. It's still quite intensive, but will be able to handle more.