Fix impulse vector when hitting ground

This commit is contained in:
karl 2020-02-01 12:49:20 +01:00
parent 153d545550
commit ee733726e3

View File

@ -14,8 +14,8 @@ func action():
func push(body): func push(body):
# TODO: Hardcoded values - maybe try to generalize # We multiply by 0.1 because we only want it to spin slightly, it should mostly go up
base.apply_impulse(transform.basis.xform(Vector3(-3.0, 0.0, 0.0)), base.transform.basis.y * 10.0) base.apply_impulse(transform.basis.xform(touch_area.global_transform.origin) * 0.1, base.transform.basis.y * 5.0)
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta: float) -> void: #func _process(delta: float) -> void: