Hot answers tagged

3

I'm not really a fan of this : if contact.bodyA.categoryBitMask < contact.bodyB.categoryBitMask { firstBody = contact.bodyA secondBody = contact.bodyB } else { firstBody = contact.bodyB secondBody = contact.bodyA } and prefer to do the following: let contactMask = contact.bodyA.categoryBitMask | contact.bodyB.categoryBitMask ...


1

I dont think you can turn off the vibration feature of the device. Your game will not vibrate the device unless you call Handheld.Vibrate(), so in your Toggle function why not just set a bool to true or false and do a check against that bool when you want to vibrate. You can actually implement a Toggle control from UnityEngine.UI and use its OnValueChanged ...



Only top voted, non community-wiki answers of a minimum length are eligible