So, I’m building my first original 3D game in Unity and I’m running into some trouble with the programming. What I’m aiming to accomplish is this:
Is there a way to be able to sense the mouse on an object in the scene and have an effect of some sort on it by clicking on it?
Thank you all! 
P.S. I’ve tried making a RayCast with a line of sight but it is interfering with the player controller script and causing all sorts of nasty issues…Any and all help is greatly appreciated!
You have to disable the playercontroller script and unlock the cursor.
Then you will be able to cast a ray using the mouse position
1 Like
Do you know of a way to cause an object to move to a set position when you click on it?
The object transform has a vector3 position. You get it by
gameObject.transform.position = new Vector3(positionX,positionY,positionZ);
1 Like
Thank you so much, you were a huge help! 
I may have a few more questions for you if you don’t mind me pestering you? <3
Line of sight would work, it’s interacting with the player controller because by default it raycasts against all layers. You can use a “LayerMask” in the Raycast to make the rays only hit colliders that are set to a certain layer. So you might have your environment objects on a layer called “Environment” and only let that raycast hit that. You can also get all the objects the raycast penetrated by using RaycastAll() instead and then loop through the results to see if you hit an object you wanted.
Many different ways to approach problems depending on your specific gameplay needs 
Yes, there are all kinds of ways to do these kind of projects. I’m used to being able to move the mouse cursor around on a still screen, but it does work that way also and I’ve played games like that. I didn’t really think about it. It’s not really any different, you are just casting a ray through the center of the screen when it’s locked.
Thank you for all of your help! <3