how to clone btCollisionShape?

gasim
Posts: 6
Joined: Tue Dec 03, 2013 9:31 pm

how to clone btCollisionShape?

Post by gasim »

Is there a way to clone btCollisionShape? I have read somewhere from old posts in this forum, it would be more efficient to just reference it but I am using component based entity system and I want all the objects use their own instance of the object. I can use shared pointers to handle memory management but it would be ideal (design wise) to clone the collision shape itself.

Thanks,
Gasim
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: how to clone btCollisionShape?

Post by Erwin Coumans »

No, you collision shapes cannot clone themselves. You will need to share collision shapes in a more clever way.