diff --git a/VirtualRobot/Nodes/RobotNode.cpp b/VirtualRobot/Nodes/RobotNode.cpp index 92bab9d392867d66517771e2e4eeca9de3d26fbd..b9caf22053556c6a7e3026fd6c9363e198e5e9d9 100644 --- a/VirtualRobot/Nodes/RobotNode.cpp +++ b/VirtualRobot/Nodes/RobotNode.cpp @@ -858,6 +858,12 @@ namespace VirtualRobot this->attachChild(sensor); } + // if we are already initialized, be sure the sensor is also intialized + if (initialized) + { + sensor->initialize(shared_from_this()); + } + return true; }