Sync head and body position transform

Godot Version

4.6.3

Question

How can i make players head change position in sync with body? (game runs at 60 fps)

func _physics_process(delta: float) -> void:
    if Player_State["PRONED"]:
	
		cameraPivot.global_position = CameraPivotForProned.global_position
		
		player_head_mesh.global_position = CameraPivotForProned.global_position
		
		player_head_proned_collision.global_position = CameraPivotForProned.global_position
		player_head_proned_collision.rotation.y = cameraPivot.rotation.y
		
		player_body_proned_collision.rotation.y = cameraPivot.rotation.y

Character scene tree


(Surfed the internet but couldn’t find any solutions or hints to why that happens.
My guess is CameraPivotForProned is child of body and because of that it is kinda delayed?)

I’m not quite sure what the issue is. Is the problem a slight lag?

You could try the following:

  1. Increase the physics processing speed to at least twice the FPS.
  2. Run it on a more powerful computer.

I tested with higher physics processing speed and the lag is still noticeable

if i walk at really high speed the head and body move perfectly but rotating produces this issue

Making head child of a body fixes the issue but how can i do it without making it a child

Why can’t that be done?

Because then to sync head collision shape i need to add staticbody3d as a child to head mesh and then make head collision shape a child of a staticbody3d

Well, there are options. Either there will be a delay, or the work will become more complicated. A choice has to be made. And as for having everything right away — Звиняйте хлопці, бананів немає! (Yes! We Have No Bananas.)

Lately, I’ve been getting more and more disappointed in Godot.

I guess i’ll just use rigged model instead of tinkering with meshes