If I’m understanding your code correctly, you are getting one value from two dimensional values and that doesn’t work for me. Also in linear(objPos, 0,1000, 0, 100) second and third arguments gave me some really strange results. I think the problem is that my arguments in if statement are spacial and so are arguments in linear.
I’ll keep on trying different stuff until I get it!
Thanks for the help!
Darko Bosic