Start animation with different game object
Hi, I have this aeroplane model with animation of rudder, and I want to activate it through another game object..
( Because i had assigned a box collider in the aeroplane as a trigger for aileron animation, so no choice i have to use another gameobject's collider as a new trigger for rudder... Unless there is a way to use script to control different collider; such as: box collider, sphere collider etc, which i really no idea.. )
This is a script of my aeroplane :
public class landinggear : MonoBehaviour {
private Animator anim;
private GameObject player;
private activateRudder rud;
void Start () {
anim = GetComponent <Animator> ();
rud = GameObject.Find ("stair").GetComponent<"name of script in stair"> ();
}
void Update () {
if (rud....
Here onwards I dont know how to let unity go and check whether my character got enter collider of the stair.
Script of stair :
public class activateRudder : MonoBehaviour {
private Animator ani;
private GameObject player;
void OnTriggerStay(Collider other){...
Not really know what to do with this script..cause basically is just to enter a collider..
So my intention is If i enter collider of stairs.. the aeroplane bool will activate to true... I really stuck in this part, anyone who know how to solve this really much appreciate your help... Thanks
Your answer
Follow this Question
Related Questions
How to fix CS0246 error 1 Answer
How to recreate a puzzle like this. 0 Answers
"error CS1501: No overload for method `Add' takes `2' arguments" 0 Answers
error CS1041: Identifier expected 1 Answer