08-12-2018, 06:38 AM
I copied the script example to do collision test. and unity says it can't convert out from the collider
Assets/Scripts/GrabRope.cs(33,64): error CS1503: Argument `#2' cannot convert `out UnityEngine.Collider' expression to type `out UnityEngine.Component'
Collider collider;
if (ObiCollider.idToCollider.TryGetValue(contact.other,out collider)){
// do something with the collider.
}
i looked at CollisionEventHandler and it uses Component collider; is that what it should be?
all i know is its not working. trying for a long time today to code a grab the rope script
Assets/Scripts/GrabRope.cs(33,64): error CS1503: Argument `#2' cannot convert `out UnityEngine.Collider' expression to type `out UnityEngine.Component'
Collider collider;
if (ObiCollider.idToCollider.TryGetValue(contact.other,out collider)){
// do something with the collider.
}
i looked at CollisionEventHandler and it uses Component collider; is that what it should be?
all i know is its not working. trying for a long time today to code a grab the rope script