How to create a walkalator in unity3D? i mean for example i have a box platform. When an object or player steps on the box platform it will automatically move the player to the left. and when the player moves to the right the player will be slowed cause the walkalator is forcing it to the left.
change the parent of your character to walkalator object when is enters its area. use ontrigger… or on collision… functions for entry and exit of character in walkalator area. use transform.SetParent(Transform tran);
Are you working with a 3D or 2D game? In 2D there is an effector you can put on a RigidBody2D with a 2D box collider that will move other RigidBody2D objects if they collide with it. Like a walkalator/conveyor/people mover
see reference here Unity - Manual: Surface Effector 2D
1 Like
im working on 3D game
after it was parented. how am i going to return it back to no parent when the player exits the conveyor?
Its probably too late but here’s how;
transform.SetParent(null);
1 Like
THANK YOU SO MUCH!!