Page MenuHomeFeedback Tracker

VehicleAnimationComponent/AnimationControllerComponent SetFloatVariable has no effect
Closed, ResolvedPublic

Description

Hi, I am unsure if this is a problem with AnimationControllerComponent or VehicleAnimationComponent but I've added a new variable to my vehicle animation workspace and everything previews correctly. I've now tried to add control to this variable via my script. I've successfully retrieved the animation index and then set my variable value using VehicleAnimationComponent::SetFloatValue(), but do not see any effect in-game.

Here is a video showing my animation workspace, and scripts which control the animation:
https://youtu.be/X0XYOfgX1DI

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 11 x64
Category
General

Event Timeline

Plato created this task.Aug 30 2023, 2:02 AM
Plato added a comment.Aug 30 2023, 2:05 AM

One thing to note is that the PreviewAnimationComponent is used inside of SCR_EditorImagePositionEntity. Here they use AnimationControllerComponent::SetIntVariable on line 413, but the PreviewAnimationComponent has an additional function called UpdateFrameStep which has a comment that says: "Perform one frame step to submit graph variable change".

Perhaps this should be moved to AnimationControllerComponent?

Whatever the solution is, thanks for taking the time to review.

Plato added a comment.Aug 30 2023, 7:56 PM

Sorry, please disregard. I believe I am doing something incorrect. My variables do seem to be updating correctly in Live Debug.

Geez closed this task as Resolved.Aug 31 2023, 11:26 AM
Geez claimed this task.