Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | hard |
Not Works
func _integrate_forces(state):
if Input.is_action_pressed("ui_up"):
print("Working")
pass
But it Works in
func _physics_process(delta):
if Input.is_action_pressed("ui_up"):
print("Working")
pass
Have you tried just having the print function and no input first? What kind of node is it attached too? Integrate forces exist only for nodes extending rigid physics bodies. And its purpose is only for adding forces to the body.
Gluon | 2021-12-29 19:18
Also this process wont be called if a rigid body goes to sleep you will need to keep the body awake by creating a collision, applying a force to it, or by disabling the can_sleep property.
Gluon | 2021-12-29 19:26