(I feel like somewhere this question must have been asked, I just can’t seem to find the answer, so if someone can redirect me to the answer I’ll gladly delete the question.)
I have this code in a little gizmo I’m making, inside the update function:
if (transform.position.x != transform.parent.position.x)
{
transform.position.x = transform.parent.position.x;
}
Is there any point in the if statement here? Does checking if the positions are the same actually have a performance hit the same as just assigning the position every frame?
Thanks!