-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Jolt built-in module in 4.4 #10526
base: master
Are you sure you want to change the base?
Conversation
0a6005d
to
b69582d
Compare
Jolt, they also introduce new problems: | ||
|
||
- :ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>` is generally | ||
slower than in Godot Physics, due to :ref:`class_CharacterBody3D`::_snap_on_floor(PR NOTE: Apply_floor_snap?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mihe was snap_on_floor
supposed to be Apply_floor_snap
? I'm not seeing a snap_on_floor
method in CharacterBody3D in the class reference.
I don't love the idea of the PR description becoming the user-facing documentation for the Jolt integration in general. It was only ever meant to create a technical "paper trail" of the notable differences that I had observed (and could actually remember) during my time working on the extension, so that there could be buy-in from any reviewers/maintainers that were interested enough to read it all. I would likely have written something user-facing differently. Unfortunately, as much as I'd love to commit to writing something more appropriate for user-facing documentation in time for 4.4-stable, it took me several days to write that PR description, and I don't foresee myself having that kind of time available in the near future, so that puts me in a bit of an awkward position with regards to pushing back on this. If there's a strong enough desire to have something like this merged then I can maybe see about taking some time to go through this, but frankly there's quite a lot still in here that I don't think makes much sense to include, so I'm not sure what it will look like in the end. |
For my part, this seems better than nothing. If we can guarantee that new user-facing documentation will be written between now and 4.5stable releasing (which is presumably the earliest that Jolt will be marked not experimental), it's fine to wait for that documentation rather than merging this PR. But if it's unclear that @mihe would have time for that, either, I'm mildly in favor of including some form of this current page with the knowledge that it can be streamlined or removed later. |
I do not want 4.4 releasing without some kind of Jolt documentation because I can see that leading to a lot of confusion. If you think too much of this shouldn't be user facing @mihe then just tell me what chunks of it to remove and I'll do that. Alternatively, If you could give me bullet point lists of what's missing in terms of feature parity compared to the extension and GodotPhysics3D I'd be fine with adding those, and removing everything else except for the overview section I wrote, the renamed project settings subsection, and the subsection on thread safety. |
The code for this is technically included with this module, and can be found as | ||
``JoltPhysicsServer3D::dump_debug_snapshots``, but it is currently unexposed for now. | ||
|
||
Roadmap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would strike this whole section, it feels out of place with other docs - the docs are generally not a place to talk about future plans, and we don't use it for roadmaps for other teams AFAIK.
The whole feature being experimental is fair, but IMO some other place (a blog post? the original PR?) are a better time capsule to capture the current state of what is in, what is going to be in, and what won't be in than the docs.
I've removed the roadmap section |
Sure, just give me some time to compile a more appropriate list, along with some very brief descriptions. It might be a week or two. |
|
||
Godot Physics supports scaling the transform of collision shapes, shape queries, as | ||
well as static and kinematic bodies, meaning :ref:`class_StaticBody3D`, | ||
:ref:`class_CharacterBody3D`, :ref:`class_AnimatableBody3D` and frozen :ref:`class_RigidBody3D`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:ref:`class_CharacterBody3D`, :ref:`class_AnimatableBody3D` and frozen :ref:`class_RigidBody3D`. | |
:ref:`class_CharacterBody3D`, :ref:`class_AnimatableBody3D`, and frozen :ref:`class_RigidBody3D`. |
the shape. | ||
|
||
Note that this also applies to :ref:`body_test_motion<class_PhysicsServer3D_method_body_test_motion>`, and consequently :ref:`test_move<class_PhysicsBody3D_method_test_move>`, | ||
:ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>` and :ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>` and :ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>`. | |
:ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>`, and :ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>`. |
|
||
Physics servers in Godot are meant to implement the :ref:`PhysicsServer3D.body_test_motion()<class_PhysicsServer3D_method_body_test_motion>` | ||
method, which in turn powers methods like :ref:`PhysicsBody3D.test_move()<class_PhysicsBody3D_method_test_move>`, | ||
:ref:`PhysicsBody3D.move_and_collide()<class_PhysicsBody3D_method_move_and_collide>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:ref:`PhysicsBody3D.move_and_collide()<class_PhysicsBody3D_method_move_and_collide>` | |
:ref:`PhysicsBody3D.move_and_collide()<class_PhysicsBody3D_method_move_and_collide>`, |
Jolt also makes use of aligned allocations for some of its memory usage, which it | ||
acquires through function pointers that the implementer assigns. Aligned allocations | ||
were recently added to Godot in the form of ``Memory::alloc_aligned_static``, | ||
``Memory::realloc_aligned_static`` and ``Memory::free_aligned_static``, which have all been |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``Memory::realloc_aligned_static`` and ``Memory::free_aligned_static``, which have all been | |
``Memory::realloc_aligned_static``, and ``Memory::free_aligned_static``, which have all been |
:ref:`get_rest_info<class_PhysicsDirectSpaceState3D_method_get_rest_info>`, | ||
:ref:`cast_motion<class_PhysicsDirectSpaceState3D_method_cast_motion>`, | ||
:ref:`body_test_motion<class_PhysicsServer3D_method_body_test_motion>`, | ||
:ref:`test_move<class_PhysicsBody3D_method_test_move>`, :ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:ref:`test_move<class_PhysicsBody3D_method_test_move>`, :ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>` | |
:ref:`test_move<class_PhysicsBody3D_method_test_move>`, :ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>`, |
~~~~~~~~~~~ | ||
|
||
The joint nodes that are exposed in the Godot Jolt extension (JoltPinJoint3D, | ||
JoltHingeJoint3D, JoltSliderJoint3D, JoltConeTwistJoint3D and JoltGeneric6DOFJoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JoltHingeJoint3D, JoltSliderJoint3D, JoltConeTwistJoint3D and JoltGeneric6DOFJoint) | |
JoltHingeJoint3D, JoltSliderJoint3D, JoltConeTwistJoint3D, and JoltGeneric6DOFJoint) |
This whole PR is largely the information from the PR that added Jolt (godotengine/godot#99895) copy and pasted, and then heavily edited for proper formatting, adding links, rephrasing and cutting out content that only makes sense for the PR ("maybe we should do this in the future" stuff).
There are not links for the project settings listed at the bottom for name changes as that didn't seem necessary, but I'll add them if people think they should be there.
I've looked over the Jolt PRs merged since this initial PR was merged and I believe the information here is accurate.
@mihe let me know if there's anything at all you wanted added, changed or removed