Hi
I am having a bit of frustration with something that I guess is very simple when you know how!
I am trying to highlight particular parts of a board when the player puts their mouse over it, see image below (the red highlighted point):
I created a basic model and attached a box collider (and later a mesh collider) to it. I then used the following script:
private void OnMouseEnter()
{
if(Selectable)
{
renderer.material.color = SelectedColour;
}
}
private void OnMouseExit()
{
if(Selectable)
{
renderer.material.color = NormalColour;
}
}
The strange thing is the collider only seems to work when I run the mouse down one side of it.
Any ideas why this might be, or even better… a better implementation for my task.
Thanks in advance.
John T