Topic was automatically imported from the old Question2Answer platform.
Asked By
Oktomol
Hello
hope you can understand me.
I have project where i want to have an object/box where the player can walkthough(like no collision) it the first time, but when the player exited the object it will block/set collision. So you can only go though the object the first time, the next time it will be blocked.
If you mean some sort of one way door, I guess you could give the Staticbody/Area2D Collision shape set to “trigger”, and after your Rigidbody exits it, spawn a scene with normal collision shape(or change “trigger” to normal via script, I guess there should be way for it).
What I would do is use the collision layers and mask.
The setup would be a invisible wall, on a different layer, that the player first moves past. Then you use a Area node or some kind of event and enable the layer of the wall; now the player can’t pass again.