character


Destroy Object by Hit – Unity3D (C#) Before implement this code, please check if you add “Rigidbody” component to your objects and “Is Trigger” box is selected. Otherwise, it doesn’t work. 1 2 3 4 5 void OnTriggerEnter(Collider c){ if (c.collider.tag == "Enemy") { Destroy(c.gameObject); } } void OnTriggerEnter(Collider c){ […]

Destroy Object by Hit – Unity3D (C#)


Character Control with Keyboard – Unity3D (C#) I will show you 2 ways to move your character with keyboard. Create a cube named “Char” and create a script named “Movement”. You can attach this script to Char object but we won’t.  Lets create an object before Start() function: public GameObject character; […]

Character Control with Keyboard – Unity3D (C#)