im trying to access height of a capsuler collider so that i can use it with in a function but i keep getting this error
Custom_scripts/CH_Controller.js(20,70): BCE0019: ‘height’ is not a member of ‘UnityEngine.Collider’.
below is an extract of my code
if(Physics.Raycast(transform.position,-transform.up,collider.height/2 + 0.2))
{
isGrounded=true;
Jumping= false;
inAir=false;
}
i later tried defining height as below but it also didnt work
function Start () {
var robotCollider = gameObject.GetComponent(CapsuleCollider);
}
function FixedUpdate () {
if(!isGrounded){
if(Physics.Raycast(transform.position,-transform.up,robotCollider.height/2 + 0.2))
{
isGrounded=true;
Jumping= false;
inAir=false;
}
``}