What do you want to save?
Add Code snippet
New code examples
-
C# 2021-10-24 17:16:14
unity make 3d object spin towards mouse
//Inside your update loop, add the following code: //First, get the mouse position Vector2 mousePosition = new Vector2 ( Input.GetAxis("MouseX"), Input.GetAxis("MouseY") ); //Then, use unity's built-in lookAt function to do all ... Add solution -
Other 2021-10-17 21:47:03
point at mouse
//Inside your update loop, add the following code: //First, get the mouse position Vector2 mousePosition = new Vector2 ( Input.GetAxis("MouseX"), Input.GetAxis("MouseY") ); //Then, use unity's built-in lookAt function to do all ... Add solution -
-
C# 2021-10-03 22:35:02
how to make an object point towards the mouse in unity
//Inside your update loop, add the following code: //First, get the mouse position Vector2 mousePosition = new Vector2 ( Input.GetAxis("MouseX"), Input.GetAxis("MouseY") ); //Then, use unity's built-in lookAt function to do all ... Add solution -
Other 2021-09-30 03:46:04
enemy code unity
/*if you want the code to work you need to do this steps step 1 : you need to have on your enemy a collider. step 2 : you will need to add the target (what the enemy goind to follow); step 3 : you will need to add how match health he will have and how fa... Add solution -
C# 2021-09-28 13:12:05
unity look at target
transform.LookAt(target.transform.position); Add solution