Implement transformations for bullet flyby sounds

remotes/1705382094874458415/tmp_refs/heads/godot4-port
Jan Heemstra 2020-09-25 23:02:39 +02:00
parent 9efb1baa18
commit a45a242803
2 changed files with 8 additions and 8 deletions

View File

@ -53,9 +53,13 @@ func gravity():
if not is_on_floor():
self.velocity.y -= GRAVITY
func get_closest_point(A: Vector3, B: Vector3):
func get_closest_point(_A: Vector3, _B: Vector3):
var A = transform.inverse().xform(_A)
var B = transform.inverse().xform(_B)
var diff = B - A
return A - (A.dot(diff) * diff) / (diff.length_squared())
var result = A - (A.dot(diff) * diff) / (diff.length_squared())
return result.xform(transform)
remote func walk(direction: Vector2):

View File

@ -76,9 +76,9 @@ anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -511.401
margin_top = -301.225
margin_top = -300.757
margin_right = 512.599
margin_bottom = 298.775
margin_bottom = 299.243
__meta__ = {
"_edit_use_anchors_": false
}
@ -149,7 +149,6 @@ margin_top = -1.0
margin_right = 16.0
margin_bottom = 1.0
rect_rotation = 45.3067
rect_scale = Vector2( 1, 0.5 )
rect_pivot_offset = Vector2( -8, 1 )
__meta__ = {
"_edit_use_anchors_": false
@ -161,7 +160,6 @@ margin_top = -1.0
margin_right = 16.0
margin_bottom = 1.0
rect_rotation = 135.307
rect_scale = Vector2( 1, 0.5 )
rect_pivot_offset = Vector2( -8, 1 )
__meta__ = {
"_edit_use_anchors_": false
@ -173,7 +171,6 @@ margin_top = -1.0
margin_right = 16.0
margin_bottom = 1.0
rect_rotation = 225.306
rect_scale = Vector2( 1, 0.5 )
rect_pivot_offset = Vector2( -8, 1 )
__meta__ = {
"_edit_use_anchors_": false
@ -185,7 +182,6 @@ margin_top = -1.0
margin_right = 16.0
margin_bottom = 1.0
rect_rotation = -44.6931
rect_scale = Vector2( 1, 0.5 )
rect_pivot_offset = Vector2( -8, 1 )
__meta__ = {
"_edit_use_anchors_": false