Move With Object Ability

KO_Games

Member
Hi Justin. I had a question about the move with object ability in version 3. It was my understanding that we didn't need to use kinematic objects anymore with version 3. In the documentation for the move with object ability, it doesn't mention the need to use these. However, it seems in the move with object ability script, it requires that the target object has the KinematicObject component attached to the potential target in order to set the target. The version 3 asset mentions that this ability is included, but I don't see an example of this ability in the demo scene to compare the setup in case I was missing something.

What is the correct way to use to the move with object ability? And can you use the move with object ability on a target that is moved in the update loop instead of the fixed update loop?

Thanks!
 
The MoveWithObject ability will set the the CharacterLocomotion.MovingPlatform field. The controller will then move according to that transform value. There may be some desynchronization though since the character updates within FixedUpdate and interpolates within Update. For that you can implement the ISmoothedObject interface on your moving object. With this interface there isn't a requirement that the object update within a specific location.
 
This ability is used to make the character move and not to move an object? It doesn't allow the character to take an object in their hand and move with it, right?
 
No, this ability does not pickup and move an object. It's for things such as moving platforms that don't use the MovingPlatform component.
 
Top