Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

cant play 3rd person animation

$
0
0
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); }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>