Please pick an indentation style and stick to it. e.g.:
Code:
for (int i = 9; i <= 12; i++) {
if (IntersectsModel(Crusor, Item[i]) {
ItemIndex = i;
}
}
Code:
for (int i = 9; i <= 12; i++)
{
if (IntersectsModel(Crusor, Item[i])
{
ItemIndex = i;
}
}
Originally Posted by
Brigs76
However this method always returns ItemIndex as being 12 no matter which object the cursor is actually over. How can I make it return the proper item index? I know the problem is with the for loop logic and not the actual IntersectModel function.
Then what you know is wrong, because the only way this for loop could do that is if IntersectModel were faulty.
Also, you spelt Cursor wrong.