Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision code sample not working
#1
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
Reply


Messages In This Thread
Collision code sample not working - by aphixe - 08-12-2018, 06:38 AM