Animation Frame

Hi! My question is simple, is there any way to set an objects animation frame without playing it? Just lets say setting its frame from 0 to 10 and keeping it at 10? Thanks!

You can’t set the frame number, but you can set a time using AnimationState.time or AnimationState.normalizedTime. You can freeze playback by setting the speed value to zero.

  • If you want to play your animation through, from frame 0 to frame 10 THEN hold it at frame 10 you need to set the WrapMode to to ClampForever:
yourCharacter.animation["yourAnimationName"].wrapMode = WrapMode.ClampForever;
  • If you want to be able to jump to, and stop on frame 10 immediately, then you could create a single frame animation in the import settings, again wrap as clamped.

Does that help?[/quote]

Thanks for the responses! It seems easiest to just make a single frame animation and then just play that animation for the effect that I jumped to a frame. Thanks again!