0% found this document useful (0 votes)
41 views

Space Trooper 1 (Part 2.1) Tutorial - Players Animations

The document provides instructions to add animations to a player character in a game. It describes how to: 1. Add an idle animation clip to the player object to loop when standing idle. 2. Add a death animation clip to the player object that changes the sprite to create a blinking effect as it dies. 3. Set up state transitions in the animator controller to switch between the idle and death states based on a boolean parameter that indicates if the player is alive.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Space Trooper 1 (Part 2.1) Tutorial - Players Animations

The document provides instructions to add animations to a player character in a game. It describes how to: 1. Add an idle animation clip to the player object to loop when standing idle. 2. Add a death animation clip to the player object that changes the sprite to create a blinking effect as it dies. 3. Set up state transitions in the animator controller to switch between the idle and death states based on a boolean parameter that indicates if the player is alive.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Space Trooper 1 (part 2) – Player’s animations

1. Place the player character on the scene. Rename it as Player Fighter.


2. Position it nicely, rotate and scale it accordingly.
3. After that, click on GameObject > Particle System.
4. While the Particle System is selected, look at its Inspector panel,
particularly at the Particle System component. Modify the parameter
accordingly.
a. Particle System tab:-
i. Duration: 8 s
ii. Start Delay: 0 s
iii. Start Lifetime: 3.71 s
iv. Start Speed: 1 s
v. Start Size: 1
vi. Start Color: any reddish colour
b. Shape:-
i. Shape: cone
ii. Angle: 0
iii. Radius: 0.3
c. Size over Lifetime:-
i. Size: a curve that produces larger particles at the beginning
and reducing the size towards the end (the last curve).
d. Rotation over Lifetime:-
i. Angular Velocity: Curve that produces faster speed at the
beginning and slowing down towards the end (graph in the
middle).
e. Renderer:-
i. Add a new material to the Materials folder.
ii. Change the Shader to Particles > Additive.
iii. Drag the fire flame image from the Textures folder to the
texture box of that material as found in the Inspector
panel.
iv. Rename this material as Fire and drag it to the Material of
the Renderer.
f. Emission:
i. Rate over Time: 100
5. Idle animation of the Player Fighter:
a. Select the Player Fighter.
b. Look for Animation panel. If it is not found on screen, click on Window
> Animation from the menu.
c. From the Animation panel, click on the Create button.
d. Name this animation clip as PlayerIdle. Select a corresponding folder to
save it.
e. Notice that the record button is now turned on. By default, all
available game objects are visible in an animation.
6. Death animation of the Player Fighter:
a. Select the Player Fighter > click at the dropdown list from the
Animation panel > Create New Clip > name it PlayerDeath > select a
location to save it.
b. Add Property > Sprite Renderer > Sprite.
c. Double-click on the timeline to add in keyframes in order to change the
sprites for the dying effect of the player.
d. Select each keyframe added in sequence and delete the sprite alternately
to create the blinking effect as part of the dying animation of the Player
Fighter.
7. Change the view to Animator panel (Window > Animator).
8. By default, PlayerIdle state is selected (indicated by orange coloured box).
9. Make a transition from PlayerIdle to PlayerDeath by right-clicking on the
PlayerIdle > Make Transition > PlayerDeath.
10. From the left upper corner of Animator panel, switch the view to
Parameters. Add a new parameter to activate the transition > Bool > name
it as isAlive and check the box.
11. Select the transition arrow > look for the Conditions in Inspector panel >
add the parameter isAlive with the value FALSE.
12. Make another transition from PlayerDeath to PlayerIdle and change the
condition from Exit Time to isAlive set to TRUE.

You might also like