- Home /
Add keyframe in existing animation at runtime
Hi,
I have a cube with an animation that moves it from position (-5, 0, 0) to (5, 0, 0) in 2 seconds. I have a keyframe a time 0:00 and 2:00. What I want is to have a GUI button that when clicked, adds a keyframe to the animation at time 3:00 with the cube at position (0,0,0). The creation of the button and the actual positions obviously aren't the issue. The adding of a keyframe to an existing and playing animation at runtime is.
I prefer C#.
Please advice.
Comment