Many fixes
This commit is contained in:
parent
f234ca974e
commit
e758c9f042
11 changed files with 8784 additions and 8739 deletions
|
|
@ -15,14 +15,15 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
var collision = move_and_collide(velocity * delta)
|
||||
if collision:
|
||||
if collision.get_normal().y > 0:
|
||||
if collision.get_normal().y > 0.05:
|
||||
var fire: Node3D = preload("res://weapons/molikman/molik/molikman_molotov_fire.tscn").instantiate()
|
||||
Session.dynamic_objects_parent.add_child(fire,true)
|
||||
fire.global_position = global_position
|
||||
fire.quaternion *= Quaternion(Vector3.UP,collision.get_normal())
|
||||
queue_free()
|
||||
else:
|
||||
var normal = collision.get_normal()
|
||||
velocity = velocity.bounce(normal) * 0.5
|
||||
$MultiplayerAudio3D.multiplayer_play()
|
||||
|
||||
$molotov2.quaternion *= Quaternion($molotov2.basis.y, velocity.normalized())
|
||||
$molotov.quaternion *= Quaternion($molotov.basis.y, velocity.normalized())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue