Esempio n. 1
0
        public static IntPtr AddCharacterController(IntPtr scene, PxCapsuleController controller)
        {
            PhysXDll.OnFilterCallback filterWorld      = null;
            PhysXDll.OnFilterCallback filterController = null;

            PhysXDll.OnHitCallback hitShape      = null;
            PhysXDll.OnHitCallback hitController = null;

            if (controller.Filter != null)
            {
                filterWorld      = onFilterWorld;
                filterController = onFilterController;
            }

            if (controller.HitReport != null)
            {
                hitShape      = onHitShape;
                hitController = onHitController;
            }

            return(PhysXDll.AddCharacterController(scene, controller.ControllerData,
                                                   filterWorld, filterController, hitShape, hitController));
        }