Move With Object Ability

Rabassa

Member
Hello!

The Move With Object ability only has one target. How do I all this ability on multiple moving objects?

Thanks,

-rich
 
Can you describe your use case? The Move With Object ability assumes that you are only moving with a single object.. If you take the average of a set of moving objects then you likely wouldn't be on that moving object anymore.

If you instead want to switch which object you are moving with you can use the Target property.
 
Hi Justin,


Imagine several moving platforms infant of the player and the player needs to jump on each to traverse a level.
Some platforms would be concentric circles rotating in opposite directions.

I'm unsure how the Move with Object Ability and the Moving Platforms component work together.

thanks,
rich
 
In that case you'd set the target directly when you switch objects. Move with Object is only needed if you are not using the Moving Platform component.
 
So if, for example, my player jumps onto an object and perhaps triggers something to move that object, I would switch the target object in the move with object ability. Correct?

However if the platform is moving already, then just use the moving platform component on that object and no need to mess with the ability in the player. Sound about right?

If I use moving platform component on several objects, can I put them under a parent object and move the parent? Imagine a moon orbiting around a planet orbiting around a sun scenario. Would I also add the moving platform component to the parent or should I use my own script to move the parent?

Thanks

Rich
 
I haven't tried reparenting the Moving Platform component but I doubt that it'll work because the Moving Platform sets the position directly. In your case you'll need to create a new component which moves the object within FixedUpdate, and then assign that object to the Target variable when the character lands on it (such as when using a trigger, which is also what the demo scene does).
 
Top