0 votes

So I've been making my first 3D game. And it's sort of a parkour so when you fall I need it to reload the level. I know how to reload the scene for 2D so I thought it would be the same thing. So I tried to just do gettree().reloadcurrent_scene() on a Area node. But it didn't work and the player just fell through the Area node. So I need to know how to reload 3D scenes.

in Engine by (50 points)

I don't know much about 3D, but what if you tried executing that code in the root node of your scene?

What do you mean? The Area that restarts the scene is in a different scene.

Don't you have to execute the

get_tree().reload_current_scene()

in the same scene?

Yes I did but it didn't work the player just falls through the Area node.

Maybe the area2d isn't triggering - try to print some text to see if it works correctly.

It's an Area node not an Area2D

What about trying the same code in different functions? At a specific point in time? When the spacebar is pressed? When the scene enters the tree? Or in different nodes?

It's not detecting the collision

Wait, hold up, the Area node is not a collisionobject. A player is supposed to fall through the Area node. What are you trying to do? Why are you trying to reload the scene and then say that the player is falling through the Area node?

So there is the Area node. And it needs a collision shape but I'm using onbodyentered() but that isn't detecting the collision have to turn it off now having dinner

1 Answer

+1 vote

Try: get_tree().change_scene(.....)

by (86 points)

That's not what I want to do. I want to reload the 3D scene but the onbodyenterd(body) won't detect the collision.

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.