In this tutorial we will learn how we can destroy a 3D model when it collides with other objects in game. For that purpose, we use is_Trigger in unity 3D and we check the is_Trigger property on that object in which we want to perform some action. In this tutorial, I want to destroy a sphere when a bullet hits it. Make sure you have read previous tutorials on how to access controller and how to fire bullets. Firstly, create a 3D sphere. That's my target object. 'Now, add a collider and also check the Is Trigger property. Now, the sphere will not block anything. When anything with a collider touches it, the spheres collider will detect that. After that we add a FSM to the sphere. I added action: Trigger Event in my game as I want to destroy Sphere when a bullet enters in its collider so I added transition of die and lead it to Dying state. In Dying I added an action of Destroy Self. I already showed how to create bullets in my previous tutorial. Just make sure the bullet prefab has a Rigid body and collider in it. Then I simply uploaded my prefab to STYLY. Now I shoot from my gun and also destroy that sphere. You can add anything as enemy and shoot that with your gun

About Styly

STYLY is a cloud-based service for creating high quality, beautiful VR spaces that doesn’t require any coding.

By using STYLY, creators can express their imaginations indefinitely and build a variety of virtual spaces.

Through these spaces, we can share experiences that are unachievable in the real world.

STYLY Official Site:

Facebook Twitter Google+ Pinterest hatebu


メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

Ryohei Watanabe

Ryohei Watanabe

VR Inside元創刊編集長。Psychic VR Labが提供するVRクリエイティブプラットフォーム「STYLY( )」に惚れ込み、2018年1月よりChief Media Officerとして同社へ移籍。