Allow Spider to idle at destination

2D Mobile Game

Objective: Allow spider to reach the destination then idle and walk for the next destination doing the same.

First of all create a reference to the Animator component located in child gameobject.

To create the loop of idle and walk, just set the trigger every time the player reaches the target destination which will play Idle animation which has a exit time and plays walk animation thus enabling movement again.

This is the condition for the transition from walk to idle which check if the trigger is set.

This is the transition between idle to walk animation which has an exit time so that it automatically starts walk animation after complete Idle animation is played.

And this is the Final Result.

--

--

--

Unity Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Are You a Devops or an SRE?

Learning How to Use Python

We have read him books about being empathic, being kind, not bullying etc.; we

In defence of open floor plans for engineering

Integrating Amazon MWS API with Swift

Amazon Marketplace Web Services Logo

Refactoring my backup and restore feature to comply with scoped storage

Download stock prices with R

How to Find the Minimal Absolute Sum of Two Elements in an Array (Python Approach)

Crystal Night: Crystal cube, pyramid and prisms shot in studio with colored flashes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Niraj Karki

Niraj Karki

Unity Developer

More from Medium

Rendering Questions and Answers

How to stick decals on the Spatial Mesh of Hololens2

Automate Player Input with Unity Test Runner and NSubstitute

[ SDL2 — Part 7] Loading png files