Skip to content

Jolt RigidBody can ignore transform updates in _input method when VehicleBody and Wheel present #115322

@Haydoggo

Description

@Haydoggo

Tested versions

  • Reproducible in 4.5 beta 4
  • Not reproducible in 4.5 beta 3

Bisected to #108544

System information

Godot v4.5.beta (5a16e2f) - Windows 10 (build 19045) - Multi-window, 2 monitors @ 180Hz - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 (NVIDIA; 32.0.15.6614) - Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz (12 threads) - 15.92 GiB memory

Issue description

RigidBody3Ds sometimes ignore updates to their transform made immediately after being instantiated.
Only seems to happen if spawned from _input event e.g.

func _input(event: InputEvent) -> void:
	if event.is_action_pressed("ui_accept"):
		var ball = TEMPLATE.instantiate()
		add_child(ball)
		ball.position = Vector3(2,0,0)
OriginError.DEBUG.2026-01-24.15-49-10.-.Trim.mp4

Workaround: defer the positioning of the body with set/call_deferred

Steps to reproduce

A rigidbody can ignore initial updates to transform if all of the following criteria are met:

  • Instantiation/positioning happens in the _input event
  • A VehicleBody3D with a VehicleWheel3D child is present in the scene
  • Jolt is being used for physics

Lower framerates make the positioning fail more often

Minimal reproduction project (MRP)

origin-error-mrp.zip
Press space to spawn a rigid body, or tick Auto spawn to continually spawn rigid bodies.
Tick VehicleBodyFrozen to freeze the invisible vehicle body in scene to see the issue disappear

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions