diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-06-04 16:09:41 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-25 08:57:42 -0700 |
commit | 6a9ed72185a910f803fff91ef1f408ad91884d20 (patch) | |
tree | c830ce6dca827a29305f2e28c960264ac55b9443 /doc/classes/PhysicsServer3D.xml | |
parent | 353bb45e21fadf8da1f6fbbaaf99b8ac8acafea9 (diff) |
Clean physics direct body state usage in 2D and 3D physics
Use a C++ callback instead of Callable for synchronizing physics nodes' state with physics servers.
Remove usage of PhysicsDirectBodyState in physics nodes when not
necessary.
Store PhysicsDirectBodyState for bodies individually instead of a
singleton to avoid issues when accessing direct body state for multiple
bodies.
PhysicsDirectBodyState is initialized only when needed, so it doesn't
have to be created when using the physics server directly.
Move PhysicsDirectBodyState2D and PhysicsDirectBodyState3D to separate
cpp files.
Diffstat (limited to 'doc/classes/PhysicsServer3D.xml')
-rw-r--r-- | doc/classes/PhysicsServer3D.xml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 33eb0de698..fa4ec55783 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -478,6 +478,9 @@ <argument index="2" name="userdata" type="Variant" default="null" /> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). + The force integration function takes 2 arguments: + [code]state:[/code] [PhysicsDirectBodyState3D] used to retrieve and modify the body's state. + [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code]. </description> </method> <method name="body_set_max_contacts_reported"> |