fixed trig error in setting obj loc