DinkeyKing / Improved-KCC

Custom kinematic character controller with step functionality, for Godot.
MIT License
34 stars 2 forks source link

Detaching from the same platform can result in 2 different leave velocities #4

Closed DinkeyKing closed 1 month ago

DinkeyKing commented 4 months ago

When detaching from the same fast moving platform, it can result in 2 different leave velocities with noticable length difference. The difference between them decreases when the detach threshold is lowered.

DinkeyKing commented 1 month ago

The problem in the demo project (Godot Jolt is 0.13.0-beta1), is that get_velocity_at_local_position() method returns two different sets of velocities from the animated platform, which changes back and forth when the animation loops. I tested this with a different project, using Tweens instead of an AnimationPlayer to move the platforms (Godot Jolt is 0.13.0-stable here), and issue does not exist here. I have no idea if this is something with the AnimationPlayer or not, but the logic in IKCC does not seem to be at fault here. I might try to fix the moving platforms in the demo project.