- Home /
cant play 3rd person animation
i make a charackter with , bone,ringing,animation
and i wont that charackter to be my own charakter
BUT i get de wrong the animation wont work with carakter in unity
i USE this script and don't get any script eror i get this frome my friend
i alredy check the animation in unity it's sill move but if i play the game the charakter still move but not like the animation just like the cube movinge :3
so, pliss any one help me if the script wrong / anitying wrong
i realy need this
I use this script
:
var uvAnimationTileX = 4; //Here you can place the number of columns of your sheet.
//The above sheet has 24
var uvAnimationTileY = 4; //Here you can place the number of rows of your sheet.
//The above sheet has 1
var framesPerSecond = 10.0;
function Update () {
// Calculate index
var index : int = Time.time * framesPerSecond;
// repeat when exhausting all frames
index = index % (3 * 1);
// Size of every tile
var size = Vector2 (1.0 / uvAnimationTileX, 1.0 / uvAnimationTileY);
// split into horizontal and vertical index
var uIndex = index % uvAnimationTileX;
var vIndex = index / uvAnimationTileX;
// build offset
// v coordinate is the bottom of the image in opengl so we need to invert.
var offset = Vector2 (uIndex * size.x, 1.0 - size.y - vIndex * size.y);
renderer.material.SetTextureOffset ("_MainTex", offset);
renderer.material.SetTextureScale ("_MainTex", size);
}
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Trying to simply play this animation... Help please. 1 Answer
animated sword + script 1 Answer
Need help with some OnTrigger Scripting 2 Answers
Animation Scripting Help #C 1 Answer