- Home /
How to implement glow when moused over?
I am making a first-person virtual tour of a supercomputer center, and I want to fix the mouse cursor in the middle of the screen, replace it with a crosshairs, and make it so whenever a model is moused over it glows. The program is being designed for a website. Any help would be appreciated!
Answer by FatWednesday · Nov 30, 2012 at 01:53 PM
There are many ways to achieve glowing effects. the simplest of which is to simply add a pulsing value of white (or another highlighting colour) to the main colour of the material of the object, other methods go as far as to use special shaders to render outlines on objects which can look really awesome.
As for detecting the mouse over, you will need to project the mouse's screen coordinates into world space using the Camera.mainCamera.ScreenPointToRay() function. by setting up colliders on objects within the tour, you will be able to take this ray, cast into the world, and find out which object(s) it hits.
hope this was useful.
Your answer
Follow this Question
Related Questions
2D OnMouseOver issues 0 Answers
change mouse cursor on mouseover 3 Answers
Problem with OnMouseDown(not registering clicks in some situations) 0 Answers
Setting ToolTip to Above Mouse Position 5 Answers
New UI ~ Check for mouse-hover 1 Answer