more small fixes
This commit is contained in:
parent
13157c9f84
commit
43ad4ecbab
|
@ -20,6 +20,7 @@ func _on_enter():
|
||||||
height_edge.visible = true
|
height_edge.visible = true
|
||||||
|
|
||||||
room.room_ceiling.get_node("CollisionShape3D").disabled = (floor_corner == null && height_corner == null)
|
room.room_ceiling.get_node("CollisionShape3D").disabled = (floor_corner == null && height_corner == null)
|
||||||
|
room.room_floor.get_node("CollisionShape3D").disabled = false
|
||||||
|
|
||||||
var ceiling_shape = WorldBoundaryShape3D.new()
|
var ceiling_shape = WorldBoundaryShape3D.new()
|
||||||
ceiling_shape.plane = Plane(Vector3.DOWN, 0)
|
ceiling_shape.plane = Plane(Vector3.DOWN, 0)
|
||||||
|
@ -39,6 +40,9 @@ func _on_leave():
|
||||||
height_corner.visible = false
|
height_corner.visible = false
|
||||||
height_edge.visible = false
|
height_edge.visible = false
|
||||||
|
|
||||||
|
room.room_ceiling.get_node("CollisionShape3D").disabled = true
|
||||||
|
room.room_floor.get_node("CollisionShape3D").disabled = true
|
||||||
|
|
||||||
room.room_ceiling.get_node("Clickable").on_click.disconnect(_on_click_ceiling)
|
room.room_ceiling.get_node("Clickable").on_click.disconnect(_on_click_ceiling)
|
||||||
room.room_floor.get_node("Clickable").on_click.disconnect(_on_click_floor)
|
room.room_floor.get_node("Clickable").on_click.disconnect(_on_click_floor)
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,16 @@ func _on_enter():
|
||||||
if room.wall_mesh.mesh == null:
|
if room.wall_mesh.mesh == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
var ceiling_shape = room.room_ceiling.get_node("CollisionShape3D")
|
||||||
|
var floor_shape = room.room_floor.get_node("CollisionShape3D")
|
||||||
|
|
||||||
|
ceiling_shape.disabled = false
|
||||||
|
floor_shape.disabled = false
|
||||||
|
|
||||||
room.ceiling_mesh.mesh = generate_ceiling_mesh()
|
room.ceiling_mesh.mesh = generate_ceiling_mesh()
|
||||||
room.room_ceiling.get_node("CollisionShape3D").shape = room.ceiling_mesh.mesh.create_trimesh_shape()
|
ceiling_shape.shape = room.ceiling_mesh.mesh.create_trimesh_shape()
|
||||||
room.room_floor.get_node("CollisionShape3D").shape = room.ceiling_mesh.mesh.create_trimesh_shape()
|
floor_shape.shape = room.ceiling_mesh.mesh.create_trimesh_shape()
|
||||||
room.room_ceiling.get_node("CollisionShape3D").shape.backface_collision = true
|
ceiling_shape.shape.backface_collision = true
|
||||||
|
|
||||||
var collisions = generate_collision()
|
var collisions = generate_collision()
|
||||||
|
|
||||||
|
@ -41,6 +47,9 @@ func _on_leave():
|
||||||
room.wall_mesh.visible = false
|
room.wall_mesh.visible = false
|
||||||
room.ceiling_mesh.visible = false
|
room.ceiling_mesh.visible = false
|
||||||
|
|
||||||
|
room.room_ceiling.get_node("CollisionShape3D").disabled = true
|
||||||
|
room.room_floor.get_node("CollisionShape3D").disabled = true
|
||||||
|
|
||||||
for collision in room.wall_collisions.get_children():
|
for collision in room.wall_collisions.get_children():
|
||||||
collision.queue_free()
|
collision.queue_free()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user