Godot Version
4.2.2
Question
Hello,
I have been trying to make it so that when my player (CharacterBody3D with child CollisionShape3D in capsule shape) Touches a building (A StaticBody3D with children MeshInstance3D and CollisionShape3D with ConcavePolygonShape3D) the scene changes. The collision itself works- you can’t clip/walk inside of the building, but I can’t figure out what to put on the script / which entity to even put a script on to ‘listen’ for the player colliding with the building to then run the line:
get_tree().change_scene(“res://insideScene.tscn”)
Every solution I’ve found online has either been not descriptive enough or too complicated for the simple scene change I’m trying to implement, at least to start with. I have tried __on__body_entered and it just doesn’t do anything.
TLDR, my questions are:
- How to get the script for the objects above to recognize a player/object collision? Is there a certain function I need to use?
- Which object(s) do I apply the script to?
Thank you!