
Best way to preview Fps animation from game camera?
I'm trying to preview what my fps animation would look like from the game view. When I make the camera a child of my transform anchor (in this case the chest bone) my camera resets its local transform (I assume this is because umotion thinks it's a transform that may be key framed). Theoretically, I could key the camera to match my in game offset, but I don't want to have to key the camera transform for every single animation, especially since the in game camera isn't actually a child of the animated hierarchy.
One idea I had was using late update and [ExecuteInEditMode] to set the transform of a camera not in the hierarchy every frame to follow the bone, but the camera doesn't move once I select the gameobject to animate.
What would be the best way to have a game view camera follow a bone with an offset so I can preview what my animations will look like?
Thanks
Answer

Hi MrResetti,
thank you very much for your support request.
If you're doing classical FPS where you control a camera via script and have the arms etc. as a child of the camera, you should use that setup in UMotion as well. Here is a video tutorial that uses this setup:
https://www.soxware.com/umotion-manual/InPractice1.html
If you have an entire character model and you have made the camera a child of the character model, then you should simply animate the entire character using UMotion. You're camera should preview just fine.
Please note that at the moment you first assigned your character to the UMotion Pose editor, UMotion creates the "reference pose". This is a copy of all of the characters transform's current position/rotation/scale values and acts as a "default pose" when nothing is keyed. So probably your reference pose contains an old position/rotation value of your camera transform, that's why it resets to a different position when you assign the character to the pose editor. You can udpate the reference pose in config mode.
More details regarding the reference pose can be found in this video tutorial: https://www.soxware.com/umotion-manual/Lesson5.html
Best regards,
Peter

Thanks for the reply Peter,
TLDR:
Is there a way I can run a script that "asks" uMotion where a bone currently is in world space each pose update? I looked at the uMotion extension and callback documentation and I'm unable to come up with a way accomplish this. I think this is a pretty niche case, so I understand if there isn't really a solution for this. I have come up with ways to get around my camera problem, they just involve doing some setup each time I want to work with a new animation and it may become tedious.
Full Explanation:
Sorry, I didn't correctly explain what I'm trying to accomplish. (if what I'm trying to accomplish is even possible).
For background, my setup is a first person controller that has two separate parts (body and arms) but both parts use the same humanoid model. This is so I only have to use 1 rigged model, instead of having two separate rigs. One for body, the other for arms. The problem with this setup is when I instantiate the model I'll use for the arms, I can't just make it a child of the camera, since the "spine_04" bone needs to be the actual bone that follows the camera. If I just make the model a child of the camera, the child bone will be the root of the model and the arms won't follow the camera correctly. In order to solve this, at runtime I have a LateUpdate script that updates the position and rotation such that the spine_04 bone acts as a child of the camera, and I just mask out the rest of the parent spine bone chain up to root in an Avatar Mask in the Animator Controller. It's similar to how a Parent Constraint works. Note: The LateUpdate script I just mentioned is not the same as the one I mentioned in the original post.
So unfortunately, the first video with the FPS arms doesn't apply, because in the video the fps arms root bone is basically what the spine/chest would be. But with my model, there are additional parent bones that would be included in the hierarchy in umotion, and I need "spine_04" to act as the root, rather the actual root pelvis bone.
Since my original post, I've looked deeper into the documentation, and I now realize that the way uMotion works is it makes a duplicate of the original GameObject, which is why my camera wasn't moving previously, because I was using the spine_04 of the original model as the pseduo parent, not the uMotion one. This is kind of a niche situation so if uMotion doesn't support this I understand, but basically I want the camera to follow a uMotion bone, without actually making the camera part of the rig.
It's kind of a difficult thing to describe in a text post, so if it's too confusing, I hope the TLDR gets what I'm trying to do across.
Customer support service by UserEcho
Hi MrResetti,
thank you very much for your support request.
If you're doing classical FPS where you control a camera via script and have the arms etc. as a child of the camera, you should use that setup in UMotion as well. Here is a video tutorial that uses this setup:
https://www.soxware.com/umotion-manual/InPractice1.html
If you have an entire character model and you have made the camera a child of the character model, then you should simply animate the entire character using UMotion. You're camera should preview just fine.
Please note that at the moment you first assigned your character to the UMotion Pose editor, UMotion creates the "reference pose". This is a copy of all of the characters transform's current position/rotation/scale values and acts as a "default pose" when nothing is keyed. So probably your reference pose contains an old position/rotation value of your camera transform, that's why it resets to a different position when you assign the character to the pose editor. You can udpate the reference pose in config mode.
More details regarding the reference pose can be found in this video tutorial: https://www.soxware.com/umotion-manual/Lesson5.html
Best regards,
Peter