Godot Version
4.3.stable.mono
Question
I have a RigidBody3D projectile that is added as a child of a Marker3D. In 4.2 when adding the projectile, it was added at the global transform of the marker. Now in 4.3 its added at the scene origin. Not sure why this would happen if anybody has any insight please let me know
public void LaunchProjectile(Vector3 collision_point)
{
Vector3 cast_direction = (collision_point - player.cast_point.GlobalTransform.Origin).Normalized();
RangedHitbox projectile = (RangedHitbox)projectile_to_load.Instantiate();
player.exclude.Add(projectile.GetRid());
projectile.TreeExited += () => RemoveFromExclusion(projectile.GetRid(), projectile);
player.cast_point.AddChild(projectile);
projectile.TopLevel = true; // <-- I believe this fixed it
projectile.LinearVelocity = cast_direction * projectile_velocity;
}
Edit: So I have Top Level on, but that was working with 4.2
Edit 2: I think that I fixed it by adding
projectile.TopLevel = true;
If anyone knows a better way to handle adding projectiles at a certain point of the character, or can explain to me why this was working and then stopped working in 4.3 please let me know