// public float distance { get; private set; } // public Transform transform { get; private set; } internal void PopulateFields(IntPtr vehicle, int wheelNum) { IntPtr hitActor = PhysXLib.GetGroundHitActor(vehicle, wheelNum); PhysXBody body = PhysXSceneManager.GetBodyFromPointer(hitActor); IntPtr shape = PhysXLib.GetGroundHitShape(vehicle, wheelNum); collider = body.GetColliderFromShape(shape); PhysXLib.GetGroundHitPosition(vehicle, wheelNum, _pxpoint); _pxpoint.ToVector(ref _point); }
internal void PopulateFields() { IntPtr hitActor = PhysXLib.GetRaycastHitActor(physXRaycastHit); PhysXBody body = PhysXSceneManager.GetBodyFromPointer(hitActor); transform = body.transform; IntPtr shape = PhysXLib.GetRaycastHitShape(physXRaycastHit); collider = body.GetColliderFromShape(shape); distance = PhysXLib.GetRaycastHitDistance(physXRaycastHit); PhysXLib.GetRaycastHitNormal(physXRaycastHit, _pxnormal); _pxnormal.ToVector(ref _normal); PhysXLib.GetRaycastHitPoint(physXRaycastHit, _pxpoint); _pxpoint.ToVector(ref _point); }