Hi guys n gurlz!
Argghh!
Having a bit of trouble with this!
I’m using the Update function to continuously run this code which is activated by an ios touch.
theSliderDummy.transform.position = Vector3.Lerp(theSliderDummy.transform.position, (Camera.main.ScreenToWorldPoint(new Vector3(touch.position.x,touch.position.y,iGuessTheCubesZgoesHereSomehow))), step);
Essentially its using Lerp to make a cube follow the users finger around the stage, this seems to work fine up until i have the cubes parent object move along a spline… The result is that theSliderDummy’s depth from the camera doesn’t match the cubes z value therefore the slider goes off into the distance.
how can i make it that z depth in relation to the camera is locked at the cube’s.z localPosition?