I’m building a mech which can strafe in all directions while keeping the cockpit pointed at the mouse, but when the legs would change direction the cockpit (which was a child) would rotate a little. So instead of having them as parent/child, I have them separated and am using the below code to keep them together. Problem is, I need the y axis to be 1.5units higher.
void Update() {
transform.position = LightLegsDirectional.LegsPosition;
}
I tried searching around and can’t work out how to do it.
EDIT: I fixed the problem by making a ghost object in the position it needs to be. Which seems really obvious now. I’m curious as to how changing what I needed originally is done though.