- Home /
Need the localPosition equivalent of this script
Hello,
i am looking for the localPosition equivalent of this script and it should only calculate the Positions once not like in the script ive mentioned.
Script:
void Update()
{
Vector3 direction = Hand.position - Point.position;
Hand.transform.position = Camera.transform.position + direction;
}
example video (hierarchy,...):
Comment
Answer by SunnyPalmSprings · May 21, 2019 at 03:13 PM
I believe this is what you're looking for. Start() runs once when the script is first activated. Update() runs every frame.
void Start()
{
Vector3 direction = Hand.position - Point.position;
Hand.transform.localPosition = Camera.transform.position + direction;
}
Answer by Michael_R · May 22, 2019 at 08:04 PM
Ill make a new thread thats filled with more information
Your answer

Follow this Question
Related Questions
A Perfect Question for Bunny83 hehehe 0 Answers
Having Trouble with Texture Tiling and offset values. Very specific case. 2 Answers
Unity Position Error? 1 Answer
Calculate offsets correct? 1 Answer
Simple Maths Problem - Help! 1 Answer