godotengine / godotengine/godot

Joint3D Behaviour Mismatch Between Editor Gizmo And Engine Runtime

Open
#116,246 6 comments 1 reaction 0 assignees View on GitHub
bug confirmed topic:3d topic:physics
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

## Tested Versions:
- v4.7.dev.custom_build [20d58a38c]
- v4.6.stable.steam [89cea1439]

### System information

Godot v4.6.stable (89cea1439) - Windows 11 (build 26100) - Multi-window, 3 monitors - Direct3D 12 (Mobile) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 32.0.15.9186) - 13th Gen Intel(R) Core(TM) i7-13700K (24 threads) - 63.80 GiB memory

### Issue description

**This issue only arises when using Jolt as physics backend.**
Tested on Generic6DOFJoint3D.

Setting linear limit on an axis draws the limits via gizmo in the editor. Using the applied setting during runtime seems inverted -> gizmo and runtime behaviour mismatch.

## Current Behaviour

### Editor Behaviour
Image
the linear limit on the x axis was set to. lower: -2m , upper: 1m
The Gizmo shows correct bounds, as shown in the screenshot above.

### Runtime Behaviour

lower and upper linear limit has been visualized with MeshInstance3D. Capsule moves outside of set bounds.

## Expected Behaviour
Orange capsule should only move between the red and the blue planes.

### Steps to reproduce

# Setup
## RigidBody3D
contains a movement script that moves it back and forth on the x-axis

## Generic6DOFJoint3D
- connects to the RigidBody3D named BodyA.
- linear limit x is enabled
- linear limit x upper distance is set to **1.0m**
- linear limit x lower distance is set to **-2.0m**

### Minimal reproduction project (MRP)

Compare gizmo position of Generic6DOFJoint3D in editor and behaviour during runtime.

[joint-3d-bug-report.zip](https://github.com/user-attachments/files/25288971/joint-3d-bug-report.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.