fix room collisions in edit mode
This commit is contained in:
parent
f368961bf1
commit
a21e93df0f
|
@ -36,6 +36,10 @@ func _start_edit_mode():
|
|||
wall_corners.visible = true
|
||||
wall_edges.visible = true
|
||||
wall_mesh.visible = false
|
||||
wall_mesh.mesh = null
|
||||
|
||||
for old_coll in wall_collisions.get_children():
|
||||
old_coll.queue_free()
|
||||
|
||||
func _end_edit_mode():
|
||||
wall_corners.visible = false
|
||||
|
@ -47,9 +51,6 @@ func _end_edit_mode():
|
|||
|
||||
var collisions = generate_collision(wall_mesh.mesh)
|
||||
|
||||
for old_coll in wall_collisions.get_children():
|
||||
old_coll.queue_free()
|
||||
|
||||
for collision in collisions:
|
||||
var static_body = StaticBody3D.new()
|
||||
static_body.set_collision_layer_value(4, true)
|
||||
|
|
Loading…
Reference in New Issue
Block a user