Fix impulse vector when hitting ground
This commit is contained in:
parent
153d545550
commit
ee733726e3
@ -14,8 +14,8 @@ func action():
|
||||
|
||||
|
||||
func push(body):
|
||||
# TODO: Hardcoded values - maybe try to generalize
|
||||
base.apply_impulse(transform.basis.xform(Vector3(-3.0, 0.0, 0.0)), base.transform.basis.y * 10.0)
|
||||
# We multiply by 0.1 because we only want it to spin slightly, it should mostly go up
|
||||
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.
|
||||
#func _process(delta: float) -> void:
|
||||
|
Loading…
x
Reference in New Issue
Block a user