So, currently what I’m trying to do is have a character controller(working on its own) that I can swap the mesh (in a child).
My problem comes when I get to my jumping, I debounce jumping by using OnCollisionEnter
, a bool and if statements. But if my script is in object A (player) I cannot use the void OnCollisionEnter
to check collisions on object B (mesh)…
tl;dr: How would I check object B’s collision using a script on object A
//attempt 1
mesh.collider.OnCollisionEnter()
{is_jumped = false;}
//attempt2
void Start(){
col = Transform.GetComponent(mesh.collider);}
col.OnCollisionEnter()
{is_jumped = false;}
all other attempts have equally failed…
edit: using c#