-
Notifications
You must be signed in to change notification settings - Fork 217
Description
I've got an object in my scene where I control it's size using setScale. I've also got a Collider on this object. I've found I'm having problems getting the pickers nearest object detection to work when this object is in front of another object with a Collider.
What I think is happening is that the calculated distance used to determine the nearest object is also getting mapped by the scale. So for instance if an object is 2 units away, and has a scale of 0.5, then the distance gets divided by 0.5 giving a total of 4, which is the effective distance allowing for scaling.
So if there's another object 3 units away with a normal scale of 1, this gets given a distance of 3 so the Picker thinks it's nearer and returns a hit on this object, not the scaled object that is actually closer.