Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

move object to mouse unity

//In 2d/UI you can move the object to your mouse position by writing this in a script and then adding it to the object you want to be at the mouse position also put it in the void update spot
transform.position = Input.mousePosition;

//or in 3d
transform.position = Camera.main.ScreenToWorldPoint(Input.mousePosition)
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# separate string by comma 
Csharp :: how to ping in c# forms 
Csharp :: random unity 
Csharp :: rotation facing mouse unity 
Csharp :: c# search on google 
Csharp :: get logged in user name c# 
Csharp :: c# string to byte array 
Csharp :: set particle system start colour + random between two 
Csharp :: c# int positive only 
Csharp :: c# convert string to enum 
Csharp :: debug.log unity 
Csharp :: DateTime previous day c# 
Csharp :: c# connect to mongodb 
Csharp :: c# convert object to string 
Csharp :: unity 2d joystick controls 
Csharp :: c# how to use inovke 
Csharp :: generate random string c# 
Csharp :: wpf get screen size 
Csharp :: void update 
Csharp :: milliseconds to seconds c# 
Csharp :: c# countdown timer menutes 
Csharp :: regular expression for email in c# 
Csharp :: where is c# used 
Csharp :: all month in array 
Csharp :: deserialize object to dictionary c# 
Csharp :: c# void 
Csharp :: unity topdown movement 
Csharp :: c# multiply string 
Csharp :: unity vscode no autocomplete 
Csharp :: c# string to byte[] 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =