Topic was automatically imported from the old Question2Answer platform.
Asked By
akaguriookami
hello, I’m making a game and I wanted to add a ghost mode where by pressing a key we can go through some walls (not all) and after a while it goes back to where the “physical” player is.
Start by setting one or multiple collision layers on the wall objects, and matching collision mask on the player object. When the key is pressed, modify the players collision mask so that it no longer includes the walls collision layer.
thank you i will study a little about the collision, but you know a way for when the timer out the player is teleported for the position when he was before pressing a key?
akaguriookami | 2022-07-26 12:57
There are a lot of different ways to handle timers, and a lot of good explanations out there already. This page explains some of the most common methods: Godot Timing Tutorial