- Home /
Transformation not getting applied to skeletal animation when rendered from Camera
I am rendering game object using Camera.Render that has a skeletal animation rendered using Skinned Mesh Renderer.
I have updated transformation when rendered using Camera.Render but it is not getting applied for the Animation. Other animations rendered using Mesh Renderer are getting the transformation applied.
I am using Camera.Render to save the frame to a texture.
Are you trying to modify some bones after the animation frame?
Try perfor$$anonymous$$g this in LateUpdate() Camera.Render is an unnecessary step.
Apologies if I didn't understand what you were getting at.
I will be modifying transformation in one of the parent object of the animation before using Camera.Render to render the scene to a texture. $$anonymous$$odifying the transformation is not happening in the Update. So I want the animation to be updated manually. $$anonymous$$y code will be something like,
// Update a Game object
foreach (var cam in Camera.allCameras) {
RenderTexture orgTargetTexture = cam.targetTexture;
cam.targetTexture = renderTexture_;
cam.Render();
cam.targetTexture = orgTargetTexture;
}