GithubHelp home page GithubHelp logo

godot-jolt / godot-jolt Goto Github PK

View Code? Open in Web Editor NEW
1.6K 23.0 53.0 2.24 MB

Godot Jolt is a Godot extension that integrates the Jolt physics engine

License: MIT License

CMake 5.90% PowerShell 1.20% C++ 92.90%
game-development gdextension godot godot-engine godotengine physics physics-simulation gamedev

godot-jolt's Introduction

Godot Jolt

Godot Jolt is a native extension for the Godot game engine that allows you to use the Jolt physics engine to power Godot's 3D physics.

It functions as a drop-in replacement for Godot Physics, by implementing the same nodes that you would use normally, like RigidBody3D or CharacterBody3D.

Table of Contents

What features are there?

Better performance, mainly, but also just having different characteristics compared to Godot Physics.

There are also (completely optional) substitute nodes available for all the joints, which line up better with the interface that Jolt offers than what the default joints do. This allows for things like breakable joints, soft limits and the ability to override solver iterations per-joint.

What about determinism?

While Jolt itself offers deterministic simulations, Godot Jolt is not able to make such guarantees. Simulations in Godot Jolt may look deterministic, and may even happen to be deterministic, but this should not be relied upon if determinism is a hard requirement.

What's not supported?

  • WorldBoundaryShape3D is not supported
  • The physics server is not thread-safe (yet)
  • Memory usage is not reflected in Godot's performance monitors (yet)
  • Ray-casts do not support face_index
  • SoftBody3D does not support any interactions with Area3D

What else is different?

  • Area3D detecting static bodies is opt-in, at a potentially heavy performance/memory cost
  • Joints only support soft limits through their substitutes (JoltHingeJoint3D, etc.)
  • Springs and linear motors are actually implemented in Generic6DOFJoint3D
  • Single-body joints will make node_a be the "world node" rather than node_b
  • Ray-casts using hit_back_faces will hit the back/inside of all shapes, not only concave ones
  • Ray-casts are not affected by the backface_collision property of ConcavePolygonShape3D
  • Shape-casts should be more accurate, but their cost also scale with the cast distance
  • Shape margins are used, but are treated as an upper bound and scale with the shape's extents
  • Manipulating a body's shape(s) after it has entered a scene tree can be costly
  • Contact impulses are estimations and won't be accurate when colliding with multiple bodies
  • Contact reporting for kinematic bodies is partially opt-in, at a potentially heavy performance/memory cost

Also consider this note from Jolt's documentation:

In order for the simulation to be accurate, dynamic objects should be in the order of 0.1 to 10 m long, have speeds in the order of 0 to 500 m/s and have gravity in the order of 0 to 10 m/s^2. Static object should be in the order of 0.1 to 2000 m long.

What versions of Godot are supported?

Currently the only supported version is Godot 4.2 (including 4.2.x).

What platforms are supported?

  • Windows (x86-64, x86)
  • Linux (x86-64, x86)
  • macOS (x86-64 + Apple Silicon)
  • iOS
  • Android (ARM64, ARM32, x86-64, x86)

Note that Linux support is limited to glibc 2.31 or newer, which for Ubuntu means 20.04 (Focal Fossa) or newer.

How do I get started?

  1. Download it from GitHub or from Godot Asset Library
  2. Extract the files to your project directory
  3. Start (or restart) Godot
  4. Open your project settings
  5. Make sure "Advanced Settings" is enabled
  6. Go to "Physics" and then "3D"
  7. Change "Physics Engine" to "JoltPhysics3D"
  8. Restart Godot

What settings are there?

See docs/settings.md for information about the project settings available in Godot Jolt.

How do I build from source?

See docs/building.md for information about how to build Godot Jolt from source.

What do the versions mean?

Godot Jolt adheres to Semantic Versioning, formatted as <major>.<minor>.<patch>. The major version will be incremented when backwards-incompatible API changes are made, the minor version will be incremented when backwards-compatible API changes are made and the patch version will be incremented when changes are made that don't affect the API.

"API", in this case, refers to any user-facing parts of the extension, such as nodes, properties, methods, parameters or project settings.

Note that major version 0.x.y carries a special meaning in semantic versioning, where even minor versions may contain backwards-incompatible changes.

See CHANGELOG.md for details about what notable changes were included in each version.

What's the license?

Godot Jolt is distributed under the MIT license. See LICENSE.txt for more details and THIRDPARTY.txt for third-party licenses.

godot-jolt's People

Contributors

jrouwe avatar mihe avatar tracefree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot-jolt's Issues

`SliderJoint3D` is not as flexible in its limits as with Godot Physics

SliderJoint3D currently does not support a lower limit above 0, nor does it support an upper limit below 0. This means you can't have only negative/positive limits, like -10 to -5.

I managed to solve this for Generic6DOFJoint by rebuilding the joint when changing the limit values and shifting the reference frame to accommodate for the spans that Jolt allows for. Something similar probably needs to happen for SliderJoint3D.

See JoltSliderJointImpl3D::limits_changed:

if (limit_lower > basically_pos_zero) {
WARN_PRINT(
"Slider joint lower distances greater than 0 are not supported by Godot Jolt. "
"Values outside this range will be clamped."
);
}
if (limit_upper < basically_neg_zero) {
WARN_PRINT(
"Slider joint upper distances less than 0 are not supported by Godot Jolt. "
"Values outside this range will be clamped."
);
}

PhysicalBone3D

Description

This issue tracks the progress of implementing the functionality of Godot's PhysicalBone3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Note that most of the functionality for PhysicalBone3D is implemented on top of the physics server, within Godot itself, and doesn't rely on much bespoke functionality from the physics server, outside of what is already needed for things like RigidBody3D. So while this list may look daunting, most of it should work with little or no effort, assuming the things it relies on does as well.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional) ๐Ÿ‘ˆ
  • Done (as much as it can be)
  • Done (completely)

Links

Documentation: PhysicalBone3D
Inherits: PhysicsBody3D, CollisionObject3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Body Offset (body_offset)
  • Mass (mass)
  • Friction (friction)
  • Bounce (bounce)
  • Gravity Scale (gravity_scale)
  • ๐Ÿ›‘ Custom Integrator (custom_integrator)
    • Not supported by Jolt
  • Linear Damp Mode (linear_damp_mode)
    • Combine (DAMP_MODE_COMBINE)
    • Replace (DAMP_MODE_REPLACE)
  • Linear Damp (linear_damp)
  • Angular Damp Mode (angular_damp_mode)
    • Combine (DAMP_MODE_COMBINE)
    • Replace (DAMP_MODE_REPLACE)
  • Angular Damp (angular_damp)
  • Linear Velocity (linear_velocity)
  • Angular Velocity (angular_velocity)
  • Can Sleep (can_sleep)
  • Bone Name (bone_name)

Joint

  • Type (joint_type)
    • None (JOINT_TYPE_NONE)
    • PinJoint (JOINT_TYPE_PIN)
    • ConeJoint (JOINT_TYPE_CONE)
    • HingeJoint (JOINT_TYPE_HINGE)
    • SliderJoint (JOINT_TYPE_SLIDER)
    • 6DOFJoint (JOINT_TYPE_6DOF)
  • Offset (joint_offset)
  • Rotation (joint_rotation)

Properties (PhysicsBody3D)

Axis Lock

  • Linear X (BODY_AXIS_LINEAR_X)
  • Linear Y (BODY_AXIS_LINEAR_Y)
  • Linear Z (BODY_AXIS_LINEAR_Z)
  • Angular X (BODY_AXIS_ANGULAR_X)
  • Angular Y (BODY_AXIS_ANGULAR_Y)
  • Angular Z (BODY_AXIS_ANGULAR_Z)

Properties (CollisionObject3D)

Uncategorized

  • Disable Mode (disable_mode)
    • ๐Ÿšง Remove (DISABLE_MODE_REMOVE)
    • Static (DISABLE_MODE_MAKE_STATIC)
    • Active (DISABLE_MODE_KEEP_ACTIVE)

Collision

  • Layer (collision_layer)
  • Mask (collision_mask)
  • Priority (collision_priority)

Input

  • ๐Ÿšง Ray Pickable (input_ray_pickable)
    • Technically implemented, but hardcoded to true until Godot 4.1
  • Capture on Drag (input_capture_on_drag)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • _integrate_forces
  • apply_central_impulse
  • apply_impulse
  • get_bone_id
  • get_simulate_physics
  • is_simulating_physics

Methods (PhysicsBody3D)

  • add_collision_exception_with
  • remove_collision_exception_with
  • get_axis_lock
  • get_collision_exception
  • ๐Ÿšง move_and_collide
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1
  • set_axis_lock
  • ๐Ÿšง test_move
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1

Methods (CollisionObject3D)

  • _input_event
  • _mouse_enter
  • _mouse_exit
  • create_shape_owner
  • get_collision_layer_value
  • get_collision_mask_value
  • get_rid
  • get_shape_owners
  • is_shape_owner_disabled
  • remove_shape_owner
  • set_collision_layer_value
  • set_collision_mask_value
  • shape_find_owner
  • shape_owner_add_shape
  • shape_owner_clear_shapes
  • shape_owner_get_owner
  • shape_owner_get_shape
  • shape_owner_get_shape_count
  • shape_owner_get_shape_index
  • shape_owner_get_transform
  • shape_owner_remove_shape
  • shape_owner_set_disabled
  • shape_owner_set_transform

Signals (CollisionObject3D)

  • input_event
  • mouse_entered
  • mouse_exited

`RigidBody3D` and `PhysicalBone3D` do not support custom integrators

Originated from #93 and #160.

The custom_integrator property on RigidBody3D and PhysicalBone3D is not currently supported due to Jolt not offering any direct equivalent to this.

It might technically be possible to support this by force-disabling any sort of damping/friction/gravity on the Jolt body, while also ignoring any sort of force/torque/impulse explicitly applied to the Jolt body. I am however hesitant about going down this route, since it would involve having to cache the damping/friction/gravity, which will complicate things.

StaticBody3D

Description

This issue tracks the progress of implementing the functionality of Godot's StaticBody3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional) ๐Ÿ‘ˆ
  • Done (as much as it can be)
  • Done (completely)

Links

Documentation: StaticBody3D
Inherits: PhysicsBody3D, CollisionObject3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Physics Material Override (physics_material_override)
    • Friction (friction)
    • Rough (rough)
    • Bounce (bounce)
    • Absorbent (absorbent)
  • ๐Ÿ›‘ Constant Linear Velocity (constant_linear_velocity)
    • Not supported by Jolt
  • ๐Ÿ›‘ Constant Angular Velocity (constant_angular_velocity)
    • Not supported by Jolt

Properties (PhysicsBody3D)

Axis Lock

  • Linear X (BODY_AXIS_LINEAR_X)
  • Linear Y (BODY_AXIS_LINEAR_Y)
  • Linear Z (BODY_AXIS_LINEAR_Z)
  • Angular X (BODY_AXIS_ANGULAR_X)
  • Angular Y (BODY_AXIS_ANGULAR_Y)
  • Angular Z (BODY_AXIS_ANGULAR_Z)

Properties (CollisionObject3D)

Uncategorized

  • Disable Mode (disable_mode)
    • Remove (DISABLE_MODE_REMOVE)
    • Static (DISABLE_MODE_MAKE_STATIC)
    • Active (DISABLE_MODE_KEEP_ACTIVE)

Collision

  • Layer (collision_layer)
  • Mask (collision_mask)
  • Priority (collision_priority)

Input

  • ๐Ÿšง Ray Pickable (input_ray_pickable)
    • Technically implemented, but hardcoded to true until Godot 4.1
  • Capture on Drag (input_capture_on_drag)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods (PhysicsBody3D)

  • add_collision_exception_with
  • remove_collision_exception_with
  • get_axis_lock
  • get_collision_exception
  • ๐Ÿšง move_and_collide
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1
  • set_axis_lock
  • ๐Ÿšง test_move
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1

Methods (CollisionObject3D)

  • _input_event
  • _mouse_enter
  • _mouse_exit
  • create_shape_owner
  • get_collision_layer_value
  • get_collision_mask_value
  • get_rid
  • get_shape_owners
  • is_shape_owner_disabled
  • remove_shape_owner
  • set_collision_layer_value
  • set_collision_mask_value
  • shape_find_owner
  • shape_owner_add_shape
  • shape_owner_clear_shapes
  • shape_owner_get_owner
  • shape_owner_get_shape
  • shape_owner_get_shape_count
  • shape_owner_get_shape_index
  • shape_owner_get_transform
  • shape_owner_remove_shape
  • shape_owner_set_disabled
  • shape_owner_set_transform

Signals (CollisionObject3D)

  • input_event
  • mouse_entered
  • mouse_exited

ConcavePolygonShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's ConcavePolygonShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: ConcavePolygonShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Backface Collision (backface_collision)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

Methods

  • get_faces
  • set_faces

Crash on unloading a scene with a Rigidbody inside an Area3D

I've tested this in quite a few scenarios, and it looks like there is a consistent crash that happens whenever there is an active, unfrozen rigidbody overlapping an Area3D node, and I change/reload the scene through get_tree().reload_current_scene() or get_tree().change_scene_to_file("otherScene.tscn") regardless of what other scene gets loaded.

So far I've worked around this by moving the rigidbody away from the area, then waiting for a new iteration of _physics_process() before changing the scene.

This is happening in Godot 4.0 with godot-jolt compiled with msvc-x64. I do not have any error logs as far as the editor is concerned, it just crashes the game and not the editor.

SphereShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's SphereShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: SphereShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Radius (radius)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

Exported projects crash when creating physics nodes

It seems godot-cpp is a bit broken in the way it deals with memory allocations for some things. CowData<T> (and as a result Vector<T>) assumes that allocations are done with what they refer to as "pre-padding", but no such parameter is present in godot-cpp's version of Memory::alloc_static, leading to it writing out-of-bounds and corrupting the heap.

This only affects target=template_release builds of Godot, meaning exported release builds, since target=template_debug and target=editor builds always allocate with pre-padding.

See godotengine/godot-cpp#842 for more details.

BoxShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's BoxShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: BoxShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Size (size)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

Add a substitute node for `ConeTwistJoint3D`

In order to better line up with Jolt's JPH::SwingTwistConstraint there should be something like a JoltConeTwistJoint3D node that omits the bias, softness, relaxation and solver priority. It can then also expose things like the max friction torque as well as motor properties.

HeightMapShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's HeightMapShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: HeightMapShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Map Width (map_width)
  • Map Depth (map_depth)
  • Map Data (map_data)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

Generic6DOFJoint3D

Description

This issue tracks the progress of implementing the functionality of Godot's Generic6DOFJoint3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: Generic6DOFJoint3D
Inherits: Joint3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Linear Limit

  • Enabled (FLAG_ENABLE_LINEAR_LIMIT)
  • Upper Distance (PARAM_LINEAR_UPPER_LIMIT)
  • Lower Distance (PARAM_LINEAR_LOWER_LIMIT)
  • ๐Ÿ›‘ Softness (PARAM_LINEAR_LIMIT_SOFTNESS)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Restitution (PARAM_LINEAR_RESTITUTION)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Damping (PARAM_LINEAR_DAMPING)
    • Not compatible with Jolt's SixDOFConstraint

Linear Motor

  • Enabled (FLAG_ENABLE_LINEAR_MOTOR)
  • Target Velocity (PARAM_LINEAR_MOTOR_TARGET_VELOCITY)
  • Force Limit (PARAM_LINEAR_MOTOR_FORCE_LIMIT)

Linear Spring

  • ๐Ÿ›‘ Enabled (FLAG_ENABLE_LINEAR_SPRING)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Stiffness (PARAM_LINEAR_SPRING_STIFFNESS)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Damping (PARAM_LINEAR_SPRING_DAMPING)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Equilibrium Point (PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT)
    • Not compatible with Jolt's SixDOFConstraint

Angular Limit

  • Enabled (FLAG_ENABLE_ANGULAR_LIMIT)
  • Upper Angle (PARAM_ANGULAR_UPPER_LIMIT)
  • Lower Angle (PARAM_ANGULAR_LOWER_LIMIT)
  • ๐Ÿ›‘ Softness (PARAM_ANGULAR_LIMIT_SOFTNESS)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Restitution (PARAM_ANGULAR_RESTITUTION)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Damping (PARAM_ANGULAR_DAMPING)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Force Limit (PARAM_ANGULAR_FORCE_LIMIT)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ ERP (PARAM_ANGULAR_ERP)
    • Not compatible with Jolt's SixDOFConstraint

Angular Motor

  • Enabled (FLAG_ENABLE_MOTOR)
  • Target Velocity (PARAM_ANGULAR_MOTOR_TARGET_VELOCITY)
  • Force Limit (PARAM_ANGULAR_MOTOR_FORCE_LIMIT)

Angular Spring

  • ๐Ÿ›‘ Enabled (FLAG_ENABLE_ANGULAR_SPRING)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Stiffness (PARAM_ANGULAR_SPRING_STIFFNESS)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Damping (PARAM_ANGULAR_SPRING_DAMPING)
    • Not compatible with Jolt's SixDOFConstraint
  • ๐Ÿ›‘ Equilibrium Point (PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT)
    • Not compatible with Jolt's SixDOFConstraint

Propertes (Joint3D)

Uncategorized

  • Node A (node_a)
  • Node B (node_b)
  • ๐Ÿ›‘ Solver Priority (solver_priority)
    • Not supported by Jolt
  • Exclude Nodes From Collision (exclude_nodes_from_collision)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • get_flag_x
  • get_flag_y
  • get_flag_z
  • get_param_x
  • get_param_y
  • get_param_z
  • set_flag_x
  • set_flag_y
  • set_flag_z
  • set_param_x
  • set_param_y
  • set_param_z

SoftBody3D

Description

This issue tracks the progress of implementing the functionality of Godot's SoftBody3D node type.

Status

  • Not supported ๐Ÿ‘ˆ
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be)
  • Done (completely)

Links

Documentation: SoftBody3D
Inherits: N/A

CapsuleShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's CapsuleShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: CapsuleShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Radius (radius)
  • Height (height)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

Add a substitute node for `HingeJoint3D`

In order to better line up with Jolt's JPH::HingeConstraint there should be something like a JoltHingeJoint3D node that omits the bias, softness, relaxation and solver priority. It can then also expose things like the max friction torque as well as any motor properties, like position motors with frequency/damping.

RigidBody3D

Description

This issue tracks the progress of implementing the functionality of Godot's RigidBody3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional) ๐Ÿ‘ˆ
  • Done (as much as it can be)
  • Done (completely)

Links

Documentation: RigidBody3D
Inherits: PhysicsBody3D, CollisionObject3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Mass (mass)
  • Inertia (inertia)
  • Center of Mass Mode (center_of_mass_mode)
    • Auto (CENTER_OF_MASS_MODE_AUTO)
    • Custom (CENTER_OF_MASS_MODE_CUSTOM)
  • Physical Material Override (physics_material_override)
    • Friction (friction)
    • Rough (rough)
    • Bounce (bounce)
    • Absorbent (absorbent)
  • Gravity Scale (gravity_scale)
  • ๐Ÿ›‘ Custom Integrator (custom_integrator)
    • Not supported by Jolt
  • Continuous CD (continuous_cd)
  • Max Contacts Reported (max_contacts_reported)
  • Contact Monitor (contact_monitor)
  • Sleeping (sleeping)
  • Can Sleep (can_sleep)
  • Lock Rotation (lock_rotation)
  • Freeze (freeze)
  • Freeze Mode (freeze_mode)
    • Static (FREEZE_MODE_STATIC)
    • Kinematic (FREEZE_MODE_KINEMATIC)

Linear

  • Velocity (linear_velocity)
  • Damp Mode (linear_damp_mode)
    • Combine (DAMP_MODE_COMBINE)
    • Replace (DAMP_MODE_REPLACE)
  • Damp (linear_damp)

Angular

  • Velocity (angular_velocity)
  • Damp Mode (angular_damp_mode)
    • Combine (DAMP_MODE_COMBINE)
    • Replace (DAMP_MODE_REPLACE)
  • Damp (angular_damp)

Constant Forces

  • Force (constant_force)
  • Torque (constant_torque)

Properties (PhysicsBody3D)

Axis Lock

  • Linear X (BODY_AXIS_LINEAR_X)
  • Linear Y (BODY_AXIS_LINEAR_Y)
  • Linear Z (BODY_AXIS_LINEAR_Z)
  • Angular X (BODY_AXIS_ANGULAR_X)
  • Angular Y (BODY_AXIS_ANGULAR_Y)
  • Angular Z (BODY_AXIS_ANGULAR_Z)

Properties (CollisionObject3D)

Uncategorized

  • Disable Mode (disable_mode)
    • Remove (DISABLE_MODE_REMOVE)
    • Static (DISABLE_MODE_MAKE_STATIC)
    • Active (DISABLE_MODE_KEEP_ACTIVE)

Collision

  • Layer (collision_layer)
  • Mask (collision_mask)
  • Priority (collision_priority)

Input

  • ๐Ÿšง Ray Pickable (input_ray_pickable)
    • Technically implemented, but hardcoded to true until Godot 4.1
  • Capture on Drag (input_capture_on_drag)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • _integrate_forces
  • add_constant_central_force
  • add_constant_force
  • add_constant_torque
  • apply_central_force
  • apply_central_torque
  • apply_central_impulse
  • apply_force
  • apply_impulse
  • apply_torque
  • apply_torque_impulse
  • get_colliding_bodies
  • get_contact_count
  • get_inverse_inertia_tensor
  • set_axis_velocity

Methods (PhysicsBody3D)

  • add_collision_exception_with
  • remove_collision_exception_with
  • get_axis_lock
  • get_collision_exception
  • ๐Ÿšง move_and_collide
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1
  • set_axis_lock
  • ๐Ÿšง test_move
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1

Methods (CollisionObject3D)

  • _input_event
  • _mouse_enter
  • _mouse_exit
  • create_shape_owner
  • get_collision_layer_value
  • get_collision_mask_value
  • get_rid
  • get_shape_owners
  • is_shape_owner_disabled
  • remove_shape_owner
  • set_collision_layer_value
  • set_collision_mask_value
  • shape_find_owner
  • shape_owner_add_shape
  • shape_owner_clear_shapes
  • shape_owner_get_owner
  • shape_owner_get_shape
  • shape_owner_get_shape_count
  • shape_owner_get_shape_index
  • shape_owner_get_transform
  • shape_owner_remove_shape
  • shape_owner_set_disabled
  • shape_owner_set_transform

Signals

  • body_entered
  • body_exited
  • body_shape_entered
  • body_shape_exited
  • sleeping_state_changed

Signals (CollisionObject3D)

  • input_event
  • mouse_entered
  • mouse_exited

CharacterBody3D

Description

This issue tracks the progress of implementing the functionality of Godot's CharacterBody3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Note that most of the functionality for CharacterBody3D is implemented on top of the physics server, within Godot itself, and doesn't rely on much bespoke functionality from the physics server, outside of what is already needed for things like RigidBody3D. So while this list may look daunting, most of it should work with little or no effort, assuming the things it relies on does as well.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional) ๐Ÿ‘ˆ
  • Done (as much as it can be)
  • Done (completely)

Links

Documentation: CharacterBody3D
Inherits: PhysicsBody3D, CollisionObject3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Motion Mode (motion_mode)
    • Grounded (MOTION_MODE_GROUNDED)
    • Floating (MOTION_MODE_FLOATING)
  • Up Direction (up_direction)
  • Slide on Ceiling (slide_on_ceiling)
  • Wall Min Slide Angle (wall_min_slide_angle)
  • Max Slides (max_slides)
    • Only available through scripts?

Floor

  • Stop on Slope (floor_stop_on_slope)
  • Constant Speed (floor_constant_speed)
  • Block on Wall (floor_block_on_wall)
  • Max Angle (floor_max_angle)
  • Snap Length (floor_snap_length)

Moving Platform

  • On Leave (platform_on_leave)
  • Floor Layers (platform_floor_layers)
  • Wall Layers (platform_wall_layers)

Collision

  • Safe Margin (safe_margin)

Properties (PhysicsBody3D)

Axis Lock

  • Linear X (BODY_AXIS_LINEAR_X)
  • Linear Y (BODY_AXIS_LINEAR_Y)
  • Linear Z (BODY_AXIS_LINEAR_Z)
  • Angular X (BODY_AXIS_ANGULAR_X)
  • Angular Y (BODY_AXIS_ANGULAR_Y)
  • Angular Z (BODY_AXIS_ANGULAR_Z)

Properties (CollisionObject3D)

Uncategorized

  • Disable Mode (disable_mode)
    • Remove (DISABLE_MODE_REMOVE)
    • Static (DISABLE_MODE_MAKE_STATIC)
    • Active (DISABLE_MODE_KEEP_ACTIVE)

Collision

  • Layer (collision_layer)
  • Mask (collision_mask)
  • Priority (collision_priority)

Input

  • ๐Ÿšง Ray Pickable (input_ray_pickable)
    • Technically implemented, but hardcoded to true until Godot 4.1
  • Capture on Drag (input_capture_on_drag)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • get_floor_angle
  • get_floor_normal
  • get_last_motion
  • get_last_slide_collision
  • get_platform_velocity
  • get_position_delta
  • get_real_velocity
  • get_slide_collision
  • get_slide_collision_count
  • get_wall_normal
  • is_on_ceiling
  • is_on_ceiling_only
  • is_on_floor
  • is_on_floor_only
  • is_on_wall
  • is_on_wall_only
  • ๐Ÿšง move_and_slide
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1

Methods (PhysicsBody3D)

  • add_collision_exception_with
  • remove_collision_exception_with
  • get_axis_lock
  • get_collision_exception
  • ๐Ÿšง move_and_collide
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1
  • set_axis_lock
  • ๐Ÿšง test_move
    • Works, but recovery_as_collision is hardcoded to true until Godot 4.1

Methods (CollisionObject3D)

  • _input_event
  • _mouse_enter
  • _mouse_exit
  • create_shape_owner
  • get_collision_layer_value
  • get_collision_mask_value
  • get_rid
  • get_shape_owners
  • is_shape_owner_disabled
  • remove_shape_owner
  • set_collision_layer_value
  • set_collision_mask_value
  • shape_find_owner
  • shape_owner_add_shape
  • shape_owner_clear_shapes
  • shape_owner_get_owner
  • shape_owner_get_shape
  • shape_owner_get_shape_count
  • shape_owner_get_shape_index
  • shape_owner_get_transform
  • shape_owner_remove_shape
  • shape_owner_set_disabled
  • shape_owner_set_transform

Signals (CollisionObject3D)

  • input_event
  • mouse_entered
  • mouse_exited

The `move_and_collide` parameter `recovery_as_collision` is always `true`

Originated from #92, #93, #94 and #160.

The recovery_as_collision parameter, that's found in methods such as move_and_collide on PhysicsBody3D, is currently always treated as true, because _body_test_motion is not being forwarded that parameter. This means we have to err on the side of assuming that this value is true, since that's what CharacterBody3D uses for its move_and_slide.

This can have negative effects on some uses of move_and_collide and test_move, since they both default this parameter to false.

I made a pull request (godotengine/godot#74707) to fix this that's been merged into Godot 4.1, so this should be resolved fairly soon.

CylinderShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's CylinderShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: CylinderShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Height (height)
  • Radius (radius)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

No roadmap available

It's something I've been meaning to do, and seems like something people would want in order to gauge progress, even if it's not a completely exhaustive list, so I simply need to sit down and do it.

Godot Physics feature parity

Description

This issue is meant to serve as a high-level overview of the things that need to be implemented in order to reach feature parity with Godot Physics.

Note that the issues listed below will likely remain open for a while, even after their respective features are fully implemented, so make sure to check within them for details on progress.

Objects

Shapes

Joints

Other

`HingeJoint3D` is not as flexible in its limits as with Godot Physics

HingeJoint3D currently does not support a lower limit outside of the -180 to 0 degree span, nor does it support upper limits outside of the 0 to +180 degree span. This means you can't have only negative/positive limits, like -180 to -175.

I managed to solve this for Generic6DOFJoint by rebuilding the joint when changing the limit values and shifting the reference frame to accommodate for the spans that Jolt allows for. Something similar probably needs to happen for HingeJoint3D.

See JoltHingeJointImpl3D::limits_changed:

if (limit_lower < basically_neg_pi || limit_lower > basically_pos_zero) {
WARN_PRINT(
"Hinge joint lower limits less than -180ยบ or greater than 0ยบ are not supported by "
"Godot Jolt. Values outside this range will be clamped."
);
}
if (limit_upper < basically_neg_zero || limit_upper > basically_pos_pi) {
WARN_PRINT(
"Hinge joint upper limits less than 0ยบ or greater than 180ยบ are not supported by "
"Godot Jolt. Values outside this range will be clamped."
);
}

clang-cl x86 builds fail randomly

This is just a formal issue for what was mentioned in #70 already:

I keep seeing x86 clang-cl builds failing from what looks like it being out of memory.

This stems from Visual Studio only shipping two editions of LLVM, one for x86 and for x64, instead of the four editions it ships of Visual C++, where you have one pair for each host architecture. This means that x86 clang-cl builds are currently being compiled with a 32-bit compiler/linker, which seem to hit their memory ceiling at random times.

The proper solution will most likely be to make a CMake toolchain file for clang-cl on Windows, which should let me bypass CMake's scanning of output binaries and effectively cross-compile x86-on-x64. This would also let us use the official release of LLVM, instead of having to rely on the (seemingly custom) Microsoft-provided one, which should help shorten scripts/ci_setup_windows.ps1 a fair bit.

ConeTwistJoint3D

Description

This issue tracks the progress of implementing the functionality of Godot's ConeTwistJoint3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: ConeTwistJoint3D
Inherits: Joint3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Swing Span (swing_span)
  • Twist Span (twist_span)
  • ๐Ÿ›‘ Bias (bias)
    • Not compatible with Jolt's SwingTwistConstraint
  • ๐Ÿ›‘ Softness (softness)
    • Not compatible with Jolt's SwingTwistConstraint
  • ๐Ÿ›‘ Relaxation (relaxation)
    • Not compatible with Jolt's SwingTwistConstraint

Propertes (Joint3D)

Uncategorized

  • Node A (node_a)
  • Node B (node_b)
  • ๐Ÿ›‘ Solver Priority (solver_priority)
    • Not supported by Jolt
  • Exclude Nodes From Collision (exclude_nodes_from_collision)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

No single-configuration CI builds

Currently the CI builds only build the configurations available in the CMake presets, which all use the Ninja Multi-Config generator. This means that we could accidentally break single-configuration generators, like the Unix Makefiles generator, and not find out about it until later.

There should be at least one single-configuration build to make sure that we verify that path in the CMake files as well. Using the regular single-configuration Ninja generator should probably suffice.

No support for 32-bit x86 platforms

To align with Godot's platform support on at least the desktop platform we need 32-bit x86 builds for both Windows and Linux.

While the Windows part of this should be a breeze, with their WoW64 stuff, I'm not all that familiar with compiling 32-bit applications on 64-bit Linux, so that might require some investigation.

CharacterBody3D is not implemented

I get error _physics_process not implemented for the CharacterBody3D.

Edit:
when placing a characterbody2D with a script and a _physics_process function you will get a "_physics_process not implemented for CharacterBody3D" error

Thread pool is not configurable

(int)std::thread::hardware_concurrency() - 1

I'm wondering if this needs to be changed in case the game already uses several threads for doing other stuff in parallel to physics. If this uses almost all hardware threads, could there be contention leading to performance issues?

In my case I also run a voxel engine, which typically runs jobs that can be pretty packed and long, sometimes overlapping multiple frames. It's a job system that doesn't need to complete all its jobs every frame like Jolt does.
I made my job system use only half of the available threads for this reason, but I wonder what that means for Jolt's job system. It is said in the docs that you could integrate your own job system in Jolt, but mine isn't really designed the same due to the absence of low-latency per-frame requirement.

Windows x64 builds produce x86 binaries when in x86 command prompt

I successfully built using windows-msvc-x64 however I am unable or unaware how to configure/setup the editor to use the addon. the examples project errors out saying it cannot find the GDExtension dynamic libraries and it fails to load.

I am in Godot V4.0 Beta 7 Mono

Using `DISABLE_MODE_REMOVE` with `PhysicalBone3D` causes a crash

Originated from #160.

When using DISABLE_MODE_REMOVE and disabling a PhysicalBone3D through PROCESS_MODE_DISABLED the application crashes in WorkerThreadPool while it's processing the tasks scheduled by JoltJobSystem.

Godot Physics also seems to crash when doing this, but seems to do so in GodotBody3D::sleep_test because its space is nullptr. I'm not sure if the two are related somehow.

I've only verified this using the ragdoll in GDQuest's godot-4.0-new-features demos, specifically the 3d_physics_nodes.tscn scene, so it's not impossible that there's something specific to that setup that causes this.

Extension classes cause exception when used from C#

Calling methods on the physics server causes errors.

Example C# script:

public override void _Ready()
{
    var body = PhysicsServer3D.BodyCreate();
}

Error:

E 0:00:01:0088   ScriptManagerBridge.cs:263 @ System.Type Godot.Bridge.ScriptManagerBridge.<TypeGetProxyClass>g__GetTypeByGodotClassAttr|12_0(System.Reflection.Assembly , System.String ): System.NullReferenceException: Object reference not set to an instance of an object.
  <C# Error>     System.NullReferenceException
  <C# Source>    /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:263 @ System.Type Godot.Bridge.ScriptManagerBridge.<TypeGetProxyClass>g__GetTypeByGodotClassAttr|12_0(System.Reflection.Assembly , System.String )
  <Stack Trace>  ScriptManagerBridge.cs:263 @ System.Type Godot.Bridge.ScriptManagerBridge.<TypeGetProxyClass>g__GetTypeByGodotClassAttr|12_0(System.Reflection.Assembly , System.String )
                 ScriptManagerBridge.cs:257 @ System.Type Godot.Bridge.ScriptManagerBridge.TypeGetProxyClass(System.String )
                 ScriptManagerBridge.cs:101 @ IntPtr Godot.Bridge.ScriptManagerBridge.CreateManagedForGodotObjectBinding(Godot.NativeInterop.godot_string_name* , IntPtr )

Area3D

Description

This issue tracks the progress of implementing the functionality of Godot's Area3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional) ๐Ÿ‘ˆ
  • Done (as much as it can be)
  • Done (completely)

Links

Documentation: Area3D
Inherits: CollisionObject3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Monitoring (monitoring)
  • Monitorable (monitorable)
  • Priority (priority)

Gravity

  • Space Override (gravity_space_override)
    • Combine (SPACE_OVERRIDE_COMBINE)
    • Combine-Replace (SPACE_OVERRIDE_COMBINE_REPLACE)
    • Replace (SPACE_OVERRIDE_REPLACE)
    • Replace-Combine (SPACE_OVERRIDE_REPLACE_COMBINE)
  • Point (gravity_point)
  • Point Unit Distance (gravity_point_unit_distance)
  • Point Center (gravity_point_center)
  • Direction (gravity_direction)
  • Gravity (gravity)

Linear Damp

  • Space Override (linear_damp_space_override)
    • Combine (SPACE_OVERRIDE_COMBINE)
    • Combine-Replace (SPACE_OVERRIDE_COMBINE_REPLACE)
    • Replace (SPACE_OVERRIDE_REPLACE)
    • Replace-Combine (SPACE_OVERRIDE_REPLACE_COMBINE)
  • Linear Damp (linear_damp)

Angular Damp

  • Space Override (angular_damp_space_override)
    • Combine (SPACE_OVERRIDE_COMBINE)
    • Combine-Replace (SPACE_OVERRIDE_COMBINE_REPLACE)
    • Replace (SPACE_OVERRIDE_REPLACE)
    • Replace-Combine (SPACE_OVERRIDE_REPLACE_COMBINE)
  • Angular Damp (angular_damp)

Wind

  • ๐Ÿ›‘ Force Magnitude (wind_force_magnitude)
    • Only relevant for SoftBody3D, which isn't supported
  • ๐Ÿ›‘ Attenuation Factor (wind_attenuation_factor)
    • Only relevant for SoftBody3D, which isn't supported
  • ๐Ÿ›‘ Source Path (wind_source_path)
    • Only relevant for SoftBody3D, which isn't supported

Audio Bus

  • Override (audio_bus_override)
  • Name (audio_bus_name)

Reverb Bus

  • Enabled (reverb_bus_enabled)
  • Name (reverb_bus_name)
  • Amount (reverb_bus_amount)
  • Uniformity (reverb_bus_uniformity)

Properties (CollisionObject3D)

Uncategorized

  • Disable Mode (disable_mode)
    • Remove (DISABLE_MODE_REMOVE)
    • Static (DISABLE_MODE_MAKE_STATIC)
    • Active (DISABLE_MODE_KEEP_ACTIVE)

Collision

  • Layer (collision_layer)
  • Mask (collision_mask)
  • Priority (collision_priority)

Input

  • ๐Ÿšง Ray Pickable (input_ray_pickable)
    • Technically implemented, but hardcoded to true until Godot 4.1
  • Capture on Drag (input_capture_on_drag)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • get_overlapping_areas
  • get_overlapping_bodies
  • has_overlapping_areas
  • has_overlapping_bodies
  • overlaps_area
  • overlaps_body

Methods (CollisionObject3D)

  • _input_event
  • _mouse_enter
  • _mouse_exit
  • create_shape_owner
  • get_collision_layer_value
  • get_collision_mask_value
  • get_rid
  • get_shape_owners
  • is_shape_owner_disabled
  • remove_shape_owner
  • set_collision_layer_value
  • set_collision_mask_value
  • shape_find_owner
  • shape_owner_add_shape
  • shape_owner_clear_shapes
  • shape_owner_get_owner
  • shape_owner_get_shape
  • shape_owner_get_shape_count
  • shape_owner_get_shape_index
  • shape_owner_get_transform
  • shape_owner_remove_shape
  • shape_owner_set_disabled
  • shape_owner_set_transform

Signals

  • area_entered
  • area_exited
  • area_shape_entered
  • area_shape_exited
  • body_entered
  • body_exited
  • body_shape_entered
  • body_shape_exited

Signals (CollisionObject3D)

  • input_event
  • mouse_entered
  • mouse_exited

Things aren't deterministic across platforms

I desire a cross platiform deterministic solution for physics, and noticed this repo.

The JoltPhysics support cross platform deterministic, I don't the principle behind that, I am not an expert of computer and compiler.

I noticed that the JoltPhysics set floating-point behavior to precise and turn off contract, and disable FMADD to realize that.

I am not familiar with cmake, it seem the CMakeLists.txt alaway set floating-point behavior to be fast.

Can we do some effort to realize cross platform deterministic base on this repo?

If it is very hard, can you give me some suggestions about this topic?

Add a substitute node for `PinJoint3D`

In order to better line up with Jolt's JPH::PointConstraint there should be something like a JoltPinJoint3D node that omits the bias, damping, impulse clamp and solver priority.

PhysicsServer3D

Description

This issue tracks the progress of implementing the functionality of Godot's PhysicsServer3D object. Below you'll find all user-facing properties and methods, including ones inherited from relevant classes. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: PhysicsServer3D
Inherits: N/A

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Methods

  • area_add_shape
  • area_attach_object_instance_id
  • area_clear_shapes
  • area_create
  • area_get_collision_layer
  • area_get_collision_mask
  • area_get_object_instance_id
  • area_get_param
  • area_get_shape
  • area_get_shape_count
  • area_get_shape_transform
  • area_get_space
  • area_get_transform
  • area_remove_shape
  • area_set_area_monitor_callback
  • area_set_collision_layer
  • area_set_collision_mask
  • area_set_monitor_callback
  • area_set_monitorable
  • area_set_param
  • area_set_ray_pickable
  • area_set_shape
  • area_set_shape_disabled
  • area_set_shape_transform
  • area_set_space
  • area_set_transform
  • body_add_collision_exception
  • body_add_constant_central_force
  • body_add_constant_force
  • body_add_constant_torque
  • body_add_shape
  • body_apply_central_force
  • body_apply_central_impulse
  • body_apply_force
  • body_apply_impulse
  • body_apply_torque
  • body_apply_torque_impulse
  • body_attach_object_instance_id
  • body_clear_shapes
  • body_create
  • body_get_collision_layer
  • body_get_collision_mask
  • body_get_collision_priority
  • body_get_constant_force
  • body_get_constant_torque
  • body_get_direct_state
  • body_get_max_contacts_reported
  • body_get_mode
  • body_get_object_instance_id
  • body_get_param
  • body_get_shape
  • body_get_shape_count
  • body_get_shape_transform
  • body_get_space
  • body_get_state
  • body_is_axis_locked
  • body_is_continuous_collision_detection_enabled
  • body_is_omitting_force_integration
  • body_remove_collision_exception
  • body_remove_shape
  • body_reset_mass_properties
  • body_set_axis_lock
  • body_set_axis_velocity
  • body_set_collision_layer
  • body_set_collision_mask
  • body_set_collision_priority
  • body_set_constant_force
  • body_set_constant_torque
  • body_set_enable_continuous_collision_detection
  • body_set_force_integration_callback
  • body_set_max_contacts_reported
  • body_set_mode
  • ๐Ÿ›‘ body_set_omit_force_integration
  • body_set_param
  • body_set_ray_pickable
  • body_set_shape
  • body_set_shape_disabled
  • body_set_shape_transform
  • body_set_space
  • body_set_state
  • body_test_motion
  • box_shape_create
  • capsule_shape_create
  • concave_polygon_shape_create
  • cone_twist_joint_get_param
  • cone_twist_joint_set_param
  • convex_polygon_shape_create
  • ๐Ÿ›‘ custom_shape_create
  • cylinder_shape_create
  • free_rid
  • generic_6dof_joint_get_flag
  • generic_6dof_joint_get_param
  • generic_6dof_joint_set_flag
  • generic_6dof_joint_set_param
  • ๐Ÿ›‘ get_process_info
  • heightmap_shape_create
  • hinge_joint_get_flag
  • hinge_joint_get_param
  • hinge_joint_set_flag
  • hinge_joint_set_param
  • joint_clear
  • joint_create
  • ๐Ÿ›‘ joint_get_solver_priority
  • joint_get_type
  • joint_make_cone_twist
  • joint_make_generic_6dof
  • joint_make_hinge
  • joint_make_pin
  • joint_make_slider
  • ๐Ÿ›‘ joint_set_solver_priority
  • pin_joint_get_local_a
  • pin_joint_get_local_b
  • pin_joint_get_param
  • pin_joint_set_local_a
  • pin_joint_set_local_b
  • pin_joint_set_param
  • separation_ray_shape_create
  • set_active
  • shape_get_data
  • shape_get_type
  • shape_set_data
  • slider_joint_get_param
  • slider_joint_set_param
  • ๐Ÿ›‘ soft_body_get_bounds
  • space_create
  • space_get_direct_state
  • space_get_param
  • space_is_active
  • space_set_active
  • space_set_param
  • sphere_shape_create
  • ๐Ÿ›‘ world_boundary_shape_create

PinJoint3D

Description

This issue tracks the progress of implementing the functionality of Godot's PinJoint3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: PinJoint3D
Inherits: Joint3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Params

  • ๐Ÿ›‘ Bias (PARAM_BIAS)
    • Not compatible with Jolt's PointConstraint
  • ๐Ÿ›‘ Damping (PARAM_DAMPING)
    • Not compatible with Jolt's PointConstraint
  • ๐Ÿ›‘ Impulse Clamp (PARAM_IMPULSE_CLAMP)
    • Not compatible with Jolt's PointConstraint

Propertes (Joint3D)

Uncategorized

  • Node A (node_a)
  • Node B (node_b)
  • ๐Ÿ›‘ Solver Priority (solver_priority)
    • Not supported by Jolt
  • Exclude Nodes From Collision (exclude_nodes_from_collision)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • get_param
  • set_param

SliderJoint3D

Description

This issue tracks the progress of implementing the functionality of Godot's SliderJoint3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: SliderJoint3D
Inherits: Joint3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Linear Limit

  • Upper Distance (PARAM_LINEAR_LIMIT_UPPER)
  • Lower Distance (PARAM_LINEAR_LIMIT_LOWER)
  • ๐Ÿ›‘ Softness (PARAM_LINEAR_LIMIT_SOFTNESS)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Restitution (PARAM_LINEAR_LIMIT_RESTITUTION)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Damping (PARAM_LINEAR_LIMIT_DAMPING)
    • Not compatible with Jolt's SliderConstraint

Linear Motion

  • ๐Ÿ›‘ Softness (PARAM_LINEAR_MOTION_SOFTNESS)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Restitution (PARAM_LINEAR_MOTION_RESTITUTION)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Damping (PARAM_LINEAR_MOTION_DAMPING)
    • Not compatible with Jolt's SliderConstraint

Linear Ortho

  • ๐Ÿ›‘ Softness (PARAM_LINEAR_ORTHOGONAL_SOFTNESS)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Restitution (PARAM_LINEAR_ORTHOGONAL_RESTITUTION)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Damping (PARAM_LINEAR_ORTHOGONAL_DAMPING)
    • Not compatible with Jolt's SliderConstraint

Angular Limit

  • ๐Ÿ›‘ Upper Angle (PARAM_ANGULAR_LIMIT_UPPER)
    • Not compatible with Jolt's SliderConstraint. Use Generic6DOFJoint3D instead.
  • ๐Ÿ›‘ Lower Angle (PARAM_ANGULAR_LIMIT_LOWER)
    • Not compatible with Jolt's SliderConstraint. Use Generic6DOFJoint3D instead.
  • ๐Ÿ›‘ Softness (PARAM_ANGULAR_LIMIT_SOFTNESS)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Restitution (PARAM_ANGULAR_LIMIT_RESTITUTION)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Damping (PARAM_ANGULAR_LIMIT_DAMPING)
    • Not compatible with Jolt's SliderConstraint

Angular Motion

  • ๐Ÿ›‘ Softness (PARAM_ANGULAR_MOTION_SOFTNESS)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Restitution (PARAM_ANGULAR_MOTION_RESTITUTION)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Damping (PARAM_ANGULAR_MOTION_DAMPING)
    • Not compatible with Jolt's SliderConstraint

Angular Ortho

  • ๐Ÿ›‘ Softness (PARAM_ANGULAR_ORTHOGONAL_SOFTNESS)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Restitution (PARAM_ANGULAR_ORTHOGONAL_RESTITUTION)
    • Not compatible with Jolt's SliderConstraint
  • ๐Ÿ›‘ Damping (PARAM_ANGULAR_ORTHOGONAL_DAMPING)
    • Not compatible with Jolt's SliderConstraint

Propertes (Joint3D)

Uncategorized

  • Node A (node_a)
  • Node B (node_b)
  • ๐Ÿ›‘ Solver Priority (solver_priority)
    • Not supported by Jolt
  • Exclude Nodes From Collision (exclude_nodes_from_collision)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • get_param
  • set_param

CollisionShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's CollisionShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be)
  • Done (completely) ๐Ÿ‘ˆ

Links

Documentation: CollisionShape3D
Inherits: Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Shape (shape)
  • Disabled (disabled)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Add a substitute node for `SliderJoint3D`

In order to better line up with Jolt's JPH::SliderConstraint there should be something like a JoltSliderJoint3D node that omits the softness, restitution, damping and solver priority. It can then expose things like its own frequency/damping, max friction force as well as any motor properties, like position motors with frequency/damping.

PhysicsDirectSpaceState3D

Description

This issue tracks the progress of implementing the functionality of Godot's PhysicsDirectSpaceState3D object. Below you'll find all user-facing properties and methods, including ones inherited from relevant classes. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be)
  • Done (completely) ๐Ÿ‘ˆ

Links

Documentation: PhysicsDirectSpaceState3D
Inherits: N/A

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Methods

  • cast_motion
  • collide_shape
  • get_rest_info
  • intersect_point
  • intersect_ray
  • intersect_shape

PhysicsDirectBodyState3D

Description

This issue tracks the progress of implementing the functionality of Godot's PhysicsDirectBodyState3D object. Below you'll find all user-facing properties and methods, including ones inherited from relevant classes. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: PhysicsDirectBodyState3D
Inherits: N/A

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • angular_velocity
  • center_of_mass (read-only)
  • center_of_mass_local (read-only)
  • inverse_inertia (read-only)
  • inverse_inertia_tensor (read-only)
  • inverse_mass (read-only)
  • linear_velocity
  • principal_inertia_axes (read-only)
  • sleeping
  • step (read-only)
  • total_angular_damp (read-only)
  • total_gravity (read-only)
  • total_linear_damp (read-only)
  • transform

Methods

  • add_constant_central_force
  • add_constant_force
  • add_constant_torque
  • apply_central_force
  • apply_central_impulse
  • apply_force
  • apply_impulse
  • apply_torque
  • apply_torque_impulse
  • get_constant_force
  • get_constant_torque
  • get_contact_collider
  • get_contact_collider_id
  • get_contact_collider_object
  • get_contact_collider_position
  • get_contact_collider_shape
  • get_contact_collider_velocity_at_position
  • get_contact_count
  • get_contact_impulse
  • get_contact_local_normal
  • get_contact_local_position
  • get_contact_local_shape
  • get_space_state
  • get_velocity_at_local_position
  • ๐Ÿ›‘ integrate_forces
    • Not supported by Jolt
  • set_constant_force
  • set_constant_torque

RayCast3D "Exclude Parent" option is ignored

If you have a CharacterBody3D with a capsule collider and a Raycast3d as a child, the Raycast collides with the parent character.
In Godots physics system, the raycast does not collide.

This isn't a high priority and easily worked around but a notable difference that may have affects elsewhere.

HingeJoint3D

Description

This issue tracks the progress of implementing the functionality of Godot's HingeJoint3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: HingeJoint3D
Inherits: Joint3D, Node3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Params

  • ๐Ÿ›‘ Bias (PARAM_BIAS)
    • Not compatible with Jolt's HingeConstraint

Angular Limit

  • Enable (FLAG_USE_LIMIT)
  • Upper (PARAM_LIMIT_UPPER)
  • Lower (PARAM_LIMIT_LOWER)
  • ๐Ÿ›‘ Bias (PARAM_LIMIT_BIAS)
    • Not compatible with Jolt's HingeConstraint
  • ๐Ÿ›‘ Softness (PARAM_LIMIT_SOFTNESS)
    • Not compatible with Jolt's HingeConstraint
  • ๐Ÿ›‘ Relaxation (PARAM_LIMIT_RELAXATION)
    • Not compatible with Jolt's HingeConstraint

Motor

  • Enable (FLAG_ENABLE_MOTOR)
  • Target Velocity (PARAM_MOTOR_TARGET_VELOCITY)
  • Max Impulse (PARAM_MOTOR_MAX_IMPULSE)

Propertes (Joint3D)

Uncategorized

  • Node A (node_a)
  • Node B (node_b)
  • ๐Ÿ›‘ Solver Priority (solver_priority)
    • Not supported by Jolt
  • Exclude Nodes From Collision (exclude_nodes_from_collision)

Properties (Node3D)

Transform

  • Position (position)
  • Rotation (rotation)
  • Scale (scale)

Methods

  • get_flag
  • get_param
  • set_flag
  • set_param

ConvexPolygonShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's ConvexPolygonShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: ConvexPolygonShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Points (points)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

The `input_ray_pickable` property is always `true`

Originated from #92, #93, #94, #95 and #160.

The input_ray_pickable property on CollisionObject3D is currently always treated as true, because _intersect_ray is missing the pick_ray parameter that's needed to differentiate between a pick ray and a non-pick ray. This means we have to err on the side of assuming that every ray is not a pick ray and ignore the input_ray_pickable property entirely.

I made a pull request (godotengine/godot#74242) to fix this that's been merged into Godot 4.1, so this should be resolved fairly soon.

SeparationRayShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's SeparationRayShape3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: SeparationRayShape3D
Inherits: Shape3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Uncategorized

  • Length (length)
  • Slide on Slope (slide_on_slope)

Properties (Shape3D)

Uncategorized

  • ๐Ÿ›‘ Custom Solver Bias (custom_solver_bias)
    • Not supported by Jolt
  • Margin (margin)

VehicleBody3D

Description

This issue tracks the progress of implementing the functionality of Godot's VehicleBody3D node type. Below you'll find all user-facing properties, methods and signals, including ones inherited from relevant node types. If you notice any missing from this list, please leave a comment down below.

Note that most of the functionality for VehicleBody3D is implemented on top of the physics server, within Godot itself, and doesn't rely on much bespoke functionality from the physics server, outside of what is already needed for things like RigidBody3D. Most of it should work with little or no effort, assuming the things it relies on does as well.

Status

  • Not supported
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be) ๐Ÿ‘ˆ
  • Done (completely)

Links

Documentation: VehicleBody3D
Inherits: RigidBody3D, PhysicsBody3D, CollisionObject3D

Legend

  • ๐Ÿšง indicates a partial, incomplete or broken implementation.
  • ๐Ÿ›‘ indicates that it's blocked or incompatible with Jolt in some way.

Properties

Motion

  • Engine Force (engine_force)
  • Brake (brake)
  • Steering (steering)

Properties (Inherited)

See #93.

Methods (Inherited)

See #93.

Signals (Inherited)

See #93.

WorldBoundaryShape3D

Description

This issue tracks the progress of implementing the functionality of Godot's WorldBoundaryShape3D node type.

Status

  • Not supported ๐Ÿ‘ˆ
  • Not started
  • Partial (not functional)
  • Partial (functional)
  • Done (as much as it can be)
  • Done (completely)

Links

Documentation: WorldBoundaryShape3D
Inherits: Shape3D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.