[SOLVED] Issue cloning object with rigidbody

Hello, i have an error when cloning an object it says it has no rigidbody, but it has, i also tryed to switch from static to kinematic but no changes. Here is the code

var bhouse = this.house1.clone();
bhouse.enabled = true;

this is the project https://playcanvas.com/editor/scene/396696
this is the js file https://playcanvas.com/editor/code/352037/terrain.js
lines 228 and follows

Are you sure you have only one graph node that is called ‘House1’? I vaguely remember you had an issue before that one of your meshe instances was also named the same as the entities.

You can verify via the debugger, a console log or doing some extra checking code before you do the clone.


if (this.house1.rigidbody) {
  console.log('I have a rigidbody');

Will check manually since searching give me just one House1
EDIT: solved changing the name of the entity, seems it was as you told @yaustar also if searching for the nodes didn’t give any double, but just remembered that maybe there is one as child somewhere. Thanks for the remind :slight_smile: