Esempio n. 1
0
        // 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);
        }
Esempio n. 2
0
        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);
        }