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


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

Ryohei Watanabe

Ryohei Watanabe

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

Share this article

Facebook Twitter Google+ Pinterest hatebu


STYLYは、VR空間を駆使した新たな表現・体験を生み出せるクリエイティブプラットフォームです。 STYLYを活用することで、コンセプチュアルなショップ空間やインスタレーション、ギャラリーなど クリエイターのイマジネーションを際限なく表現した多彩な空間を構築できます。 またその空間を通じて、今までの現実では成し得なかった体験をインターネットの世界へシェアすることができます。



Click here