Right now Im trying to use OnControllerColliderHit but cant tell when im ontop
other methods dont work when the rigidbody isnt moving
Did you try Raycasting? something like this should work
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
RaycastHit hit;
Vector3 direction;
void Start()
{
direction = new Vector3 (0, -5, 0);
}
void Update()
{
if (Physics.Raycast(transform.position, direction, out hit))
{
if (GetComponent<CharacterController>().isGrounded hit.rigidbody)
{
Debug.Log("rigidbody");
}
else
{
Debug.Log("not a rigidbody");
}
}
}
}