Godot Version
4.2.1
Question
Why child node that is attached to the scene tree doesn’t Triger _Ready() and _PhysicsProcess
I have this simple code for 2 nodes that are parent and child in the scene tree
The code for the parent (Player )
using Godot;
using System;
using System.Runtime.CompilerServices;
public partial class player : CharacterBody3D
{
[Export]
private float MouseSens =5.0f;
private float TranslateVal = 1000;
private Camera3D camera3d;
private CharacterMover characterMover;
public override void _Process(double delta)
{
characterMover.SetMoveVec(MoveVec);
}
public override void _Ready()
{
camera3d = GetNode<Camera3D>("PlayerCamera");
characterMover = GetNode<CharacterMover>("CharacterMover");
characterMover.Init(this);
}
}
Code for the child (CharacterMover) :
using Godot;
using System;
public partial class CharacterMover : Node3D
{
[Export]
private int MoveAccel = 4;
[Export]
private int MaxSpeed = 25;
private float Drag = 0.0f;
public override void _Ready()
{
Drag = (float)MoveAccel / MaxSpeed;
}
public void Init(CharacterBody3D bodytomove)
{
}
public void SetMoveVec(Vector3 movevec)
{
}
public override void _PhysicsProcess(double delta)
{
DG.Print("Hello");
}
}
The CharacterMover _PhysicsProcess and _Ready never called
Isn’t CharacterMover and its inherited method from Node3d should be invoked ?