fix: modular environment model collision setup
This commit is contained in:
parent
f43b982a74
commit
d8a511c343
26 changed files with 27 additions and 14 deletions
13
project/import_scripts/basic_environment_prop.gd
Normal file
13
project/import_scripts/basic_environment_prop.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@tool
|
||||
extends EditorScenePostImport
|
||||
|
||||
func import_node_recursive(node : Node):
|
||||
if node != null:
|
||||
if node is StaticBody3D:
|
||||
(node as StaticBody3D).collision_layer = 0b11
|
||||
for child in node.get_children():
|
||||
import_node_recursive(child)
|
||||
|
||||
func _post_import(scene: Node) -> Object:
|
||||
import_node_recursive(scene)
|
||||
return scene # Return the modified root node when you're done.
|
||||
Loading…
Add table
Add a link
Reference in a new issue