Godot Version
4.2
Question
Hello
Im able to retrieve all nodes in the scene but i have problem to retrieve the Camera3D
That is attached to Player “Nek” Node3D
What ever i do i retrieve null .
This is my hierarchy:
The code below all nodes are initiated right except the Camera3D they are both null
private Node3D Head;
private Node3D Nek;
private CollisionShape3D StandingCollisionShape3D;
private CollisionShape3D CrounchCollisionShape3D;
private RayCast3D PlayerRayCast3D;
private Camera3D PlayerCamera3D;
private Camera3D PlayerCamera3D2;
public override void _Ready()
{
Head = GetNode<Node3D>("Nek/Head");
Nek = GetNode<Node3D>("Nek");
StandingCollisionShape3D = GetNode<CollisionShape3D>("Standing_CollisionShape3D");
CrounchCollisionShape3D = GetNode<CollisionShape3D>("Crouch_CollisionShape3D");
PlayerRayCast3D = GetNode<RayCast3D>("PlayerRayCast3D");
//Both are null
PlayerCamera3D = GetNode<Camera3D>("%PlayerCamera3d");
PlayerCamera3D2 = GetNode<Camera3D>("Player/Nek/Head/PlayerCamera3d");
Input.MouseMode = Input.MouseModeEnum.Captured;
}
I can’t understand why .
Thanks