#How to make a 3D platform move when the player touches it?
1 messages · Page 1 of 1 (latest)
Just have a script check for collisions. If you add your player to a group, you can check whether it's a player and respond accordingly:
if body.is_in_group("Player"):
animations.play()```
Where do I put the script?
Assuming you're using an Area3D to detect when the character approaches the platform, in there.
how do I put an Area3D node into my already existing moving platform node?
That would work.
It is generally more reliable than trying to read for collisions.
wdym?
Bodies detect collisions with other objects. So they only respond when the collision happens and there's no signals for it either (iirc) since those are meant to be discarded as soon as the physics have been calculated.
Areas are designed to actually detect stuff entering them and have more versatility for that purpose.