Ok, so here is what I’m trying to do.
I have a gameobject that can change position, rotation, and scale. On that gameobject I have a script attached that has a different gameobject linked/inserted into it.
I’m trying to make a script that when the “Main” gameobject rotates/scales/moves the “Linked” gameobject in the script follows this rotation/movement and if the scale increases the distances between the objects increases so that there is always a set distance between them (like 10% of the size of the “linked” gameobject")
One way I though of is to fire a raycast out from the main object so that the rotation and movement will be known, and the distance can easily be calculated. I’m not certain this is the best way but I don’t know how to get the position at the end of the raycast.
Can anyone help me?
Thank you