Hello,
I’m trying to have an outline when I hover all the objects of my scene which fit a certain criteria.
When I do it manually, with
registerOnHover(obj1,false,function(){outline(obj1, 'ENABLE')},function(){outline(obj1,'DISABLE')});
registerOnHover(obj2,false,function(){outline(obj2, 'ENABLE')},function(){outline(obj2,'DISABLE')});
//...
it works fine. But when I try to use a for loop like this:
for (var i = 0 ; i < objs.length ; i++) {
registerOnHover(objs\,false,function(){outline(objs, 'ENABLE')},function(){outline(objs,'DISABLE')});
}
whenever I hover one of the objects, it is always the last one of the list that gets outlined.
If anyone could help, it’d be greatly appreciated :)
Thanks!