Hello! For my game I’ve been making been animating this cutscene in Moon Animator and I have 3 rigs, a camera rig, and two regular players rigs!
The problem is that for some odd reason, when I play all 3 of the exported animations in game it’s nothing like how it is when I play the animation in Moon Animator, and I have no ideas why?
Heirachy:
Moon Animator:
Also for some reason the rigs aren’t even getting too where they should be when the animations end and I dont get why because I’ve kept them in the same exact spot
In-Game:
The code:
local camera = workspace.CurrentCamera
local cameraRig = workspace.Cutscene.CameraRig
local hero = workspace.Cutscene.Hero
local villain = workspace.Cutscene.Villain
task.wait(5)
camera.FieldOfView = 40
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
local anim3 : AnimationTrack = cameraRig.Humanoid:LoadAnimation(game.ReplicatedStorage.CameraRig)
local anim2 : AnimationTrack = hero.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.Hero)
local anim1 : AnimationTrack = villain.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.Villain)
anim2:Play()
anim1:Play()
anim3:Play()
RunService.RenderStepped:Connect(function(deltaTime)
camera.CFrame = camera.CFrame:Lerp(cameraRig.Torso.CFrame, deltaTime * 20)
end)
I don’t quite understand why you’re trying to manually lerp the camera if you’re animating the CameraRig; I’d assume that’s what’s causing the issue. You’re not using :Lerp correctly either, as the second argument is meant to be a fraction between 0 (point A) and 1 (point B) rather than the delta time. Couldn’t you just directly set the CFrame of the camera to the CFrame of the CameraRig?
Well nah and also thet wouldnt solve the problem of the rigs not even being how they look like in Moon Animator, the reason i’m lerping is because if I just set the camera to the camera rig cframe it’s gonna be choppy and not smooth, also the camera isnt the issue really its the other two rigs, any ideas?
Just try setting the camera’s CFrame to the camera rig’s. It shouldn’t be choppy, as the animation should update every frame. I’m not sure about the other rigs, but try that first.
So basically I just created a custom recorder system where In studio I would start the moon animator animation and also have a script start recording after a few seconds and Id press play on moon animator at the same time and then wait until the animation finished, and it would export all the rigs and every single one of their motor6ds also in folders and then when i want to play it back i would go through all of them and apply the cframe values i held in those folders!
It works actually really great and is basically a 1:1 copy of how it looks in moon animator, pretty happy with it!