Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Digital Design - Keyframing: Simple Projectile Motion

First import the projectile motion image you created in Processing to Unity.
Assets -> Import New Asset

Then create a Raw Image object in the scene.

GameObject -> UI -> Raw Image


Select the added Raw Image form the Hierachy view in the left, and adjust the width and the
height to original image size from the Inspector window in the right. And adjust the X,Y,Z positions
to 0,0,0.

Then drag the imported projectile motion image to the Texture parameter of the Raw Input
object.

Then adjust the view of the Main Camera to cover the entire image in the Scene view.
Then create a Sphere in the scene.

And scale it up to match the projectile image from Inspector window.

Then select the sphere and go to the Animation window.


Then press create and save the animation in the Asset folder as Projectile_Motion.

Then click on the Enable keyframe recording mode in the Animator window.
Then position the sphere in the positions of the projectile image at each time stamps as
follows.
- Drag the white line in the animator to 0:00 and position the sphere in t=0
position of the image.
- Drag the white line the animator to 0:10 and position the sphere in t=1
position of the image.

Similarly perform above operation for all the keyframes of your image.

Once it is done, the created new animation can be seen in the Assets.
Simply drag the animation into the Sphere in Hierarchy view and play the scene to view the
projectile motion of the sphere.

You might also like