check animations array bounds (fixes crash when rotation is not animated)