![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | toblin |
Given an object xi who should have forces applied to it by objects xj, how do I [properly] apply these forces on xi through GDScript?
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | toblin |
Given an object xi who should have forces applied to it by objects xj, how do I [properly] apply these forces on xi through GDScript?
![]() |
Reply From: | kubaxius |
Applying forces to RigidBody is pretty simple, you can do this via integrate_forces function, just edit PhysicsDirectBodyState passed to it. But you can’t directly apply force to Area – the main job of this node is to simply detect other bodies overlapping, entering, or exiting. If you want to move it, simply make it a child of RigidBody or KinematicBody, and then move its parent.