Hi Ill try and explain what I’m trying to do.
Basically I have a custom modal that I have built. The modal has a position and rotation.
Each modal has a collection of parts. Each part has its own position and rotation and contains all the vertexs.
So to move the modal I have
matrix = Matrix.CreateFromYawPitchRoll(_parent.Yaw, _parent.Pitch, 0f);
matrix *= Matrix.CreateWorld(_parent.Position, Vector3.Forward, Vector3.Up);
Where _parent is the actual modal.
Then for each part I have
matrixpart = Matrix.CreateFromYawPitchRoll(part.Yaw, part.Pitch, 0f);
matrixpart *= Matrix.CreateWorld(part.Pos, Vector3.Forward, Vector3.Up);
My question is this Is there a way to combine these two matrixs? or would I have to do something like this
matrix = Matrix.CreateFromYawPitchRoll(_parent.Yaw + part.Yaw, _parent.Pitch + part.Pitch, 0f);
matrix *= Matrix.CreateWorld(_parent.Position + part.Position, Vector3.Forward, Vector3.Up);
Thanks for the help Matt