#How to make a 3D platform move when the player touches it?

1 messages · Page 1 of 1 (latest)

visual light
#

I figured out how to make a 3D moving platform, but I want that animation to activate when a player touches teh platform.

#

I should also say that this is how my moving platform is set up

sick locust
#

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()```
visual light
#

Where do I put the script?

karmic spear
visual light
karmic spear
karmic spear
#

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.

visual light
#

Okay, I think I'm doing this correctly. However, I am getting an error within my code. I don't know how to fix this. this is for my Area3D script.

#

This is how my nodes are set up