4.3
I’m trying to make a controllable rigidbody, but this code isn’t working. Any ideas on what’s wrong?
extends Node2D
var power = 100
func _physics_process(delta):
var axis = Input.get_action_strength(“Right”) -Input.get_action_strength(“Left”)
$Body.apply_impulse(Vector2.ZERO, Vector2.RIGHT * axis * power)