Destructible Object ⚠ | Sansar Store
Destructible Object ⚠

Destructible Object ⚠

 100

You need to own this item to leave a rating.

0 ratings

This script will rez an object that when collided with will break apart debris from the object, ie make it destructible. The debris are fully dynamic objects and requires a special fbx (read below). This does not use animations.

It is recommended to place this script in a Full Object scene object in the scene that has the volume removed and mesh visibility made to be hidden by default.

The script will rez the Full Object on scene startup, and replace it with the Fractured Object on first collision, after that point all collisions will trigger debris falling off next to the collision.

CRASH WARNING: Having too many debris laying around (hundreds) will cause the Sansar client to crash when someone joins the experience. It is recommended to use either the Reset Timeout or Destroy All Timeout to clean up the debris after some time they were created.

Demo:
https://gyazo.com/0cb640494a5a230647f32ce9fdac71f4
https://gyazo.com/fcb3f9a4bce885d7abbec658e797926c
https://atlas.sansar.com/experiences/evoav/destructable

The object has a specific fbx setup:
- there are two versions, the full single mesh version, and the debris version which is same object but in pieces
- all debris must all have the same origin as the object origin
- all debris should be made dynamic in Sansar, what is not dynamic will not break off
- it is recommended to add skeleton frames inside the mesh that are indestructible or have no volume, like reinforced concrete metal rods, so that pieces don't appear like they are floating in the air
- pieces that are too small cannot be uploaded to sansar

Destructible FBX Tutorial:
https://youtu.be/TI3CfA1GSaw

Changelog:
- 1.0.0 - initial release
- 1.1.0 - added reset timer and event, added more configuration such as gravity factor and air friction (slow motion)

* I allow buyers to resell this script as part of their own products, but not as a standalone script

Item name
DestructibleObject [1.1.1]
Min. resale price
50