I have a Mesh with a Spring-arm attached to another component. In game, I’m able to control the Z axis of the mesh but want the attached component z axis to remain unchanged, however the spring-arm causes both to change height. How can i prevent this?
In game I’m able to control the height
of the mesh but want the attached
component height to remain unchanged
Do you mean scaling in one of the axis or changing the length of the springarm? Asking since there’s no property called height.
Generally speaking, when it comes to parenting components, their transforms default to Relative but it can be changed to World. If done so, changing parent’s transform will not affect the child.
Z axis of what, scale? Then what I posted above is very applicable. You can also call directly set relative / world, btw. You’re not really showing anything so it’s impossible to suggest something tangible.
Well no. If you’re moving a mesh and something is attached to it, it will move with the mesh.
I’m able to control the Z axis of the
mesh but want the attached component z
axis to remain unchanged
I think it now makes more sense to me. It seems like you want to move the mesh but let the attached component stay in place. You have 2 options here:
detach the component before moving and attach it after the movement is complete; when re-attaching, offset the component by the amount its parent shifted in Z
move both components, move the parent as you normally would and move the child component in the opposite direction in relative space