Phisycs object clone
deybacsi

Hi guys!

I would like to ask the pros here, what am I doing wrong... I created a simple object, what does some things, when collided to another object.

All are phisycs objects.

All things are working fine, until I try to create a clone of my "base" object. (Yes, I clicked its "template" trigger)

The clone function is creating the object, but it doesn't do any phisycs things. It just appears, and does nothing at all. Not falling, etc...

I thought, the clone() function will clone everything from my template object.

Is it a bug, or am I doing something wrong?

Code:

(It's in another object's onClick event, just for testing)

var newobj=wade.getSceneObject("t_wood_cube").clone();
newobj.setPosition(0,0);
wade.addSceneObject(newobj,true);

Finally, the object appears, but does nothing. It just sits where appeared,

Any help apprecciated :)

All 4 Comments
Gio

Hi

That looks like a new bug.

Thanks for reporting it, I'll try to fix it asap.

deybacsi

Great!

Thanks a lot ;)

Gio

Ok, I 've got a fix... but we can't release it properly until version 3.6 which is still a couple of weeks away.

If you need the fix sooner though, you can include the script that I've attached (click the red link below that says clone) into your scene. Just make sure that this is included and added to the scene scripts before you try to clone your object, and it should work.

 

deybacsi

Hi!

\o/

Works like a charm, thanks for the fast support ;)

Post a reply
Add Attachment
Submit Reply
Login to Reply