@@ -630,6 +630,9 @@ void CollisionShape::OnNodeSet(Node* node)
Scene* scene = GetScene();
if (scene)
{
+ if (scene == node)
+ LOGWARNING(GetTypeName() + " should not be created to the root scene node");
+
physicsWorld_ = scene->GetComponent<PhysicsWorld>();
if (physicsWorld_)
physicsWorld_->AddCollisionShape(this);
@@ -358,6 +358,9 @@ void Constraint::OnNodeSet(Node* node)
physicsWorld_->AddConstraint(this);
@@ -775,6 +775,9 @@ void RigidBody::OnNodeSet(Node* node)
physicsWorld_->AddRigidBody(this);