Answers for "left mouse down unity"

C#
3

unity on mousewheel down

if (Input.GetAxis("Mouse ScrollWheel") > 0f) // forward
 {

 }
if (Input.GetAxis("Mouse ScrollWheel") < 0f) // backwards
{
               
}
Posted by: Guest on April-07-2020
0

unity left mouse button

// ============== Primary Mouse Button (Left Click) ========================
// It is true aslong the user holds the left mouse button
// Like shooting with an Automatic Gun - AK 47 :P
Input.GetKey(KeyCode.Mouse0)

// It only triggers 1 time when you click
// Like shooting a semi automatic pistol - Desert Eagle ;)
Input.GetButtonDown("Fire1")
Posted by: Guest on November-07-2021

C# Answers by Framework

Browse Popular Code Answers by Language