JohnoRobson / GodotBattleRoyal

Other
3 stars 1 forks source link

Main morgan #3

Closed morganwynne closed 1 year ago

morganwynne commented 1 year ago

I'm having a blast tackling the error spawn_player(): Condition "!is_inside_tree()" is true. Returning: Transform3D() but it's going to take more than one day.

morganwynne commented 1 year ago

There's a weird one in here. The set_global_position method throws an error when the scene is not part of the tree:

world.gd:31 @ _init_actor(): Condition "!is_inside_tree()" is true. Returning: Transform3D()
  <C++ Source>   scene/3d/node_3d.cpp:308 @ get_global_transform()

This is easily fixed by calling add_child first. This creates a bug where, if the actor is set to spawn at (0, 0), it will spawn on top (inside?) of one of the other actors. We can avoid this currently by not spawning anything at (0, 0).