Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

How to access Animation using java script & attach it to the object ?

$
0
0
i have created the walking & idle animation for my fps player. i've added a java_script to access it. but, when i run it & press button(w), it stops & says that, the animation is not attached to the object.. when i drag the walking/idle animation & drop to that object, it creates an animation controller. again i run it, still same error. i can't find where to attach the animation ?????? thnx for help... @Adamcbrz @Olgo @whydoidoit @VildNinja @hollym16 @ Here's my java script: function Update () { if(Input.GetKeyDown("w")) { GetComponent.().Play("walk_anim2", PlayMode.StopAll); } if(Input.GetKeyUp("w")) { GetComponent.().Play("idle_anim2", PlayMode.StopAll); } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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