Hello All.
I am interested into accessing collision status of rigidbody with no extra script attached onto it, and which is not working with event.
I am currently having something theorically like this
public class MyClass: MonoBehaviour {
Rigidbody PositionReferenceA;
Rigidbody PositionReferenceB;
void Start () {
PositionReferenceA = (Rigidbody)(new GameObject()).AddComponent("Rigidbody ");
PositionReferenceB = (Rigidbody)(new GameObject()).AddComponent("Rigidbody ");
}
}
And I would like to have something like this in my class :
void Update() {
if(PositionReferenceA.IscurrentlyColliding()==true)
//do stuff here
}
Is there anyway to do this?
I don’t see any accesser like this for the rigidbody class, but maybe there is a tricky way to do this?
Thanks for your time.