- Home /
Question by
purush-cad · Nov 07, 2016 at 01:15 PM ·
transform.position
Update transform point
I have this code in separate file to get platform position, whenever the platform tracker crosses the point.
void Update()
{
if (transform.position.x < platformTrackerPoint.transform.position.x)
{
platformTransform = gameObject.transform.position;
}
}
I am calling this code in the player script file in the update function. But the transform position is not updating in player script file.
tempPosition = thePlatformTracker.platformTransform;
gameObject.transform.position = tempPosition;
Your guidance is appreciated. Please let me know if anything is not clear.
Comment
Your answer
Follow this Question
Related Questions
Why is Spaceship vibrating as it moves ? 1 Answer
Transform Position doesn't work 0 Answers
geting GameObject transform position gives Spasmic numbers 1 Answer
Character controller problem 2 Answers