Skip to content

Sukhvinder-Singh/game-object-destruction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

game-object-destruction

Unity 3-D script to make destructible game objects that gets destroyed on collision.

Full asset link to the asset store:

https://www.assetstore.unity3d.com/en/#!/content/86377

Features:

This script can be used to make destructable game objects consiting of more than one rigidbodies. For example any game object you want to make destructable such as street lights, chairs etc.

Attach this script to any game object and this script will first initially set all rigidbodies as kinematic so they do not interact with physics untill and unless a collision with them occurs. On collision, rigidbodies are un-set as kinematic and they start interacting with physics.

A minimum velocity can be set for destruction to happen eg. a game object such as chair or light pole should only destruct if collision velocity magnitude of other colliding collider is greater than say, 5.

Sound effects can also be added. Different audio sources can be added and they will play randomly on collision.

About

Unity 3-D script to make destructible game objects that gets destroyed on collision.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages