#My RigidBody2D doesn't follow the movement of an AnimatableBody

9 messages · Page 1 of 1 (latest)

rugged jungle
#

When my Moving Platform (AnimatableBody2D) moves horizontally the Player (a CharacterBody2D) stays in the platform no matter where it moves, but im wondering if i can do the same with a Box (a RigidBody2D that the player can move to power mecanisms).
The box just stays in place, causing it to fall off when the platform moves.
I don't want to replace the rigidbody for a characterbody everytime i want to move it in a platform, Is there a way within the editor or using code to keep it from falling off?

meager wasp
#

there might be another way to do this using rigidbody2d, but i would try to use characterbody2d instead a rigidbody, once characterbody2d has a plataform functionality

rugged jungle
meager wasp
#

set the floor layer the same as the collision layer of the floor object

rugged jungle
#

i dont think that is gonna work

rugged jungle
# meager wasp here

this is just so the player (a characterbody) doesnt fall off the platform, and i already did that

#

is there something similar for the box (a rigidbody)?

#

or is there a way i can apply a force to move the box (this time consisting of a characterbody) with the player (still a characterbody)?