see this -
i want to play the animation and know whats in it inside unity.
Does this mean same thing -
animationTarget[ “RunAim” ].wrapMode = WrapMode.ClampForever;
The WrapMode is the mode that the animation is played, you can see the details of each wrap mode in the documentation. Also you can learn about animations using the lerpz’s 2D tutorial.
kk and technically is this script right >>
//////////////////////////////////////////////////////////////
// AnimationController.js
// Penelope iPhone Tutorial
//
// AnimationController plays the appropriate animations for Penelope
// and the blending between them. It uses the character's
// movement direction to determine which animation should be played.
//////////////////////////////////////////////////////////////
// The Animation component that this script controls
var animationTarget : Animation;
// Different speeds depending on movement direction
var maxForwardSpeed : float = 6;
var maxBackwardSpeed : float = 3;
var maxSidestepSpeed : float = 4;
private var character : CharacterController;
private var thisTransform : Transform;
private var jumping : boolean = false;
private var minUpwardSpeed = 2;
function Start()
{
// Cache component lookup at startup instead of doing this every frame
character = GetComponent( CharacterController );
thisTransform = transform;
// Set up animation settings that aren't configurable from the editor
animationTarget.wrapMode = WrapMode.Loop;
animationTarget[ "Run" ].wrapMode = WrapMode.ClampForever;
animationTarget[ "RunAim" ].wrapMode = WrapMode.ClampForever;
}
function OnEndGame()
{
// Don't update animations when the game has ended
this.enabled = false;
}
function Update()
{
var characterVelocity = character.velocity;
// When monitoring movement we check horizontal and vertical movement
// separately to decide what animations to play.
var horizontalVelocity : Vector3 = characterVelocity;
horizontalVelocity.y = 0; // ignore any vertical movement
var speed = horizontalVelocity.magnitude;
var upwardsMotion = Vector3.Dot( thisTransform.up, characterVelocity );
if ( speed > 0 )
{
animation.Play("Run");
animationTarget[ "Run" ].wrapMode = WrapMode.ClampForever;
}
else
{
animation.Play("RunAim");
animationTarget[ "RunAim" ].wrapMode = WrapMode.ClampForever;
}
}
The legs moves once as the scene loads, but what i want is it should stand and aim as scene loads and when i press joystick it should show run + aim
I have the bootcamp soldier