Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Here's the corrected code ;P

using UnityEngine;class M:MonoBehaviour{}using UnityEngine;class H:M{public bool h;public Rigidbody R;public Transform T;public Animator A;void OnTriggerEnter(Collider c){if(c.tag!="p")return;if(h){R.velocity=Vector3.zero;R.position=T.position;}else{A.SetTrigger("r");}}}using UnityEngine;class G:M{public Rigidbody R;public float S;public Transform C;void FixedUpdate(){R.AddForce(new Vector3(Input.GetAxis("h"),0.0f,Input.GetAxis("v"))*S);C.position=transform.position;}}