Godot Version
4
Question
'How can I have the position of child node not the same as the parent. I have a characterbody3d and a marker3d, how can I keep the marker childed to my characterbody while not being stuck to the players position`
4
'How can I have the position of child node not the same as the parent. I have a characterbody3d and a marker3d, how can I keep the marker childed to my characterbody while not being stuck to the players position`
If you want the marker’s position to be independent from the player’s, you just need to set the marker’s top_level property to true.
essentially, when setting the position of the Marker3D, set global_position instead
@hyvernox 's solution will work, but I recommend you ask yourself why you are doing this. If the Marker3D shouldn’t move around relative to the CharacterBody3D, it should likely not be a part of it.
well, I’m using the marker for procedural animation, and it tied into my players code deeply.
Then I suggest you describe the problem you are trying to fix in more detail. Because what it sounds like you are asking for is a point in space that will never move no matter how far away the player gets from it. Which, if used for animation, would result in very weird warping when the marker is across or even off the screen from the player.
If you set global position every frame, then it doesn’t really matter where the node is parented. It’s either that or top_level flag.