0 votes

my layout
platform2a (a Node 2D)
player (Kinmatic2d [with a sprite and collisionshape2d]
button (which is named button) [with a sprite]
platform2b ‚Äč[solid Tile map] and platform2c [Solid Tile map] [with a script ]

func physicsprocess(delta):
to hide platform2c

what i am trying to do is
when the player walks into the button
platform2c is now set to self.show() [so it can been seen and walked across]

Godot version 3.2.1 stable
in Engine by (26 points)

1 Answer

0 votes

Put a collision shape on the sprite for the button. Set up a signal from the collision shape for the button so that when the player enters it sends a signal and then add into the script for the for the platform a function from the signal to change the show/hide function on the platform.

There is a step by step guide in the documentation here


and although this guide is for a timer its the same process for a collision shape 2d.

by (1,373 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.