mittagessen war gut
This commit is contained in:
1 parent
de8777480b
commit
6127c14f82
5 files changed
+53
-44
No files matched your search
@@ -47,7 +47,7 @@ handle_input_locally = false
|
||||
render_target_update_mode = 3
|
||||
|
||||
[node name="Camera" type="Camera" parent="GUI/HBoxC/ViewportContainer/Viewport"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.16872 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 7.8064 )
|
||||
|
||||
[node name="MouseLook" type="RayCast" parent="GUI/HBoxC/ViewportContainer/Viewport"]
|
||||
enabled = true
|
||||
|
||||
@@ -67,8 +67,11 @@ func _physics_process(delta):
|
||||
|
||||
if _rayCast.is_colliding():
|
||||
# collider will be the node hit
|
||||
_attachment_point = _rayCast.get_collider().get_parent()
|
||||
print(_rayCast.get_collider())
|
||||
make_it_shine(false)
|
||||
var temp = _rayCast.get_collider().get_parent()
|
||||
if temp.has_node("OmniLight"):
|
||||
_attachment_point = temp
|
||||
make_it_shine(true)
|
||||
|
||||
|
||||
func _input(event):
|
||||
@@ -85,3 +88,8 @@ func _input(event):
|
||||
|
||||
func body_part_chosen(params):
|
||||
_attachment_point.add_child(BodyPartLoader.bodyparts[params].instance())
|
||||
|
||||
|
||||
func make_it_shine(highlight : bool):
|
||||
if _attachment_point != null:
|
||||
_attachment_point.get_node("OmniLight").visible = highlight
|
||||
Reference in new issue
Block a user