• Twitter
  • Facebook
  • Google+
  • Instagram
  • Youtube

Monday, 20 June 2016

Unity 5 - Animation

Create an animation clip from sprites

Create new Game Object and name it "SquareActor"
Create new Game Object and name it "Body"
Create new Game Object and name it "Face"
Make Body and Face to SquareActor's children
Add SpriteRenderer component to Body
Set the value of sprite for the Body's SpriteRenderer component (choose "square_green_body")
Open Animation Window (Windown -> Animation or Ctrl+6)
Select Face game object on Hierarchiy
On Animation Window, click Create to create an Animation Clip
Name it "Square_Green_Wink" and save it into Animations folder
On Animation Window, change value of Samples to 6 (it means 6 frames per second)
Drag the sprite you want to the frame 0, and (an)other sprite(s) to (an)other frame(s) to make it perfect animation. I choose frame 0 and frame 6 that means it winks once every second
Do the same for "Square_Green_GetClick" and "Square_Green_GetHigh"

Manage animation clips using Animator Controller

    • Using transition
    • Using Animation Event

Looping animation clips

  •  Choose animation file, in wrap mode, choose Loop

     


0 comments:

Post a Comment

Contact

Get in touch with me


Adress/Street

Jozi Studio -Sydney, New South Wales

Phone number

+(12) 3456 789

Website

www.learnwithjoe.blogpost.com.au