|
Hi, I have an issue in which I have 3 parts to my character: -Main Camera -Plain of Animation (For the sprites I am using) -Plain of Animation 2 (For lerping) Now what I want is that for the plains to be able to recognize when I am jumping or not. I tried to put a character controller on one of the plains (When the group selection "player" already has a character controller and a movement set) and all it did was, well screw up everything. Is there a way for me to access the character controller in the main group or to have a character controller on? Or is their a way to know the same way without the controller but with just scripting? Thanks in advance.
(comments are locked)
|
|
i'm not quite sure what you want to do but I think you want an animation to run when you jump? Try something like this:
function Update () { if(Input.GetButtonDown("Jump") && CanJump) { rigidbody.AddForce(Vector3.up * JumpSpeed); } } function OnCollisionStay(collision : Collision) { if(collision.gameObject.tag == "floor") { CanJump = true; Stop.Animation(); } }
(comments are locked)
|
