KinematicObject not moving / moving without character

ChristianWiele

Active member
Hi,

I have a platform that is moving through the Curvy SplineController. The movement can be updated in Update, FixedUpdate or LateUpdate. My character is updating in FixedUpdate.
If I am using no KinematicObject, I see significant jitter of the character. If I add a KinematicObject to the platform, then I see the following:
1. If the platform updates in Update or FixedUpdate, it is not moving at all
2. If it updates in LateUpdate, the platform moves, but the character is not carried by the platform.

The SplineController (-100) updates before the KinematicObject (9000).

How can I get this to work?

Thanks, Christian
 
Are you using the Move With Object ability?


The platform should be updated within FixedUpdate. The AnimatorUpdate component provides a basic example of an IKinematicObject implementation.
 
Yes, the platform is updated in FixedUpdate, and the character uses the MoveWithObject ability. But the problem is still that the platform is not moving at all when the KinematicObject is enabled.
 
The demo scene has an example of how to use MoveWithObject and KinematicObject on an object that is moving separately from KinematicObjectManager. It's in the 2.5D area, the object is "2.5 Platform" - the script it uses is SimplePlatform.cs. This is a good simple example of how to create this setup, although I'm not familiar with SplineController so I'm not sure if it's doing anything unique that might interfere with that process - but I doubt it. (But it'd be worth asking in their forums just in case.) I'd also recommend reading the docs on MoveWithObject: https://opsive.com/support/document...bilities/included-abilities/move-with-object/

One small note: the demo's script execution order puts the SimplePlatform in-between KinematicObjectManager and KinematicObject. (KinematicObjectManager is -5, SimplePlatform is the default of 0, KinematicObject is 9000.)
 
I found the issue. The SplineController runs at -100 which is before the KinematicObjectManager at -5. The documentation reads only that the script has to run before the KinematicObject, but not that it has to run after the KinematicObjectManager. So, you should update the documentation accordingly. After putting the SplineController to -4 it worked fine.
 
Top