Godot Version
v4.2.2.stable.official
Question
Making a fighting game, and i’ve made a dash but the dash goes through the other player and through walls, how would I fix this?
This is in func _input(event)
# Dash
if find_motion_input_from_array(input_history, (MOTION_MAP["dash"] if facing_right else MOTION_MAP["bdash"])) and actionable:
input_history.clear()
match airborne:
true: # Air Dash
print("Airdash")
false: # Grounded Dash
var newPosition = position + Vector3(2*(1 if facing_right else -1),0,0)
animActionable = false
$AnimatedSprite3D.play("dash")
await get_tree().create_tween().tween_property(self, "position", newPosition, DASH_SPEED).finished
animActionable = true