Unity3D


Move, Zoom and Rotate Camera – Unity3D (C#) Move: It is same as moving character. Just use keyboard buttons and move camera with a float speed variable. [crayon-6575059a4138e253998083/]   Zoom: To zoom with scroll wheel, we need scroll wheel input to zoom in or zoom out. [crayon-6575059a41399260912646/] Rotate: I will give […]

Move, Zoom and Rotate Camera – Unity3D (C#)


Add Sound Effect – Unity3D (C#) You can add sound effects for all actions in your project. For example, when your character jumps or collides another object or just click on a button, you can call your sound effect. At first, add an “Audio Source” to your scene. As you […]

Add Sound Effect – Unity3D (C#)


Tile-Based Ground – Unity3D (C#) To create a tile-based ground, we need a simple matrix system. A (row X column) matrix will take a plane texture and draw it in each cell.   [crayon-6575059a90043690139481/] ©Coffee Break Codes – Tile-Based Ground – Unity3D (C#)

Tile-Based Ground – Unity3D (C#)



Grid System – Unity3D (C#) Grid system is used mostly in RTS games. Your characters or buildings move on grids. You need a matrix to create a grid system. [crayon-6575059a9143e827982745/]   ©Coffee Break Codes – Grid System – Unity3D (C#)

Grid System – Unity3D (C#)


Mouse Click on Game Object – Unity3D (C#) There are two ways to perform click function on a game object: 1- Create and attach a script to the target object. Write this function in it. [crayon-6575059a9613d948763324/]   2- You can use Physics.Raycast to detect target with ray. You must write […]

Mouse Click on Game Object – Unity3D (C#)


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. [crayon-6575059aa7d63698468009/] ©Coffee Break Codes – Destroy Object by Hit – Unity3D (C#)

Destroy Object by Hit – Unity3D (C#)



Add Terrain and Skybox – Unity3D You can add terrain in Hierarchy window by clicking on Create button. But first, add a “directional light” in your scene to see your 3D objects clearly in your game scene. Click on terrain and its specifications appear on Inspector. There are 7 buttons […]

Add Terrain and Skybox – Unity3D


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: [crayon-6575059aa8ae3309200594/] character is […]

Character Control with Keyboard – Unity3D (C#)


“Hello World” for Dummies… – Unity3D When you open Unity 3D, you will see a window like this. Under the “Hierarchy” title, a main camera is created as default and you can create your objects in here and see it in “Scene” window. In Scene window, you can move, rotate […]

“Hello World” for Dummies… – Unity3D