- Home /
Are UGUI & colliders (box, sphere, mesh, etc) compatible?
Just want to fact-check some (probably self-evident) things fast -
1) UGUI is predominantly ray-cast based and is not suited for use with standard colliders (box, sphere, mesh, etc) - true?
2) If so, it'd be a total waste of time trying to set up an R-Type-style game in the UI, correct?
3) If one wanted to use UI touch controls for such a shmup, you'd just convert the movement of the UI element to world space and apply it to your 2D/3D transform/rigidbody, right?
4) And if you were going to do that, why bother with the UI touch controls - just register the input.touches[0].position, convert it to world space and apply to the game element directly. Got it?
Sorry about the obvious questions - just want to be sure about the ideal workflow. I've done some experiments (mostly unsuccessful) with UI & colliders, just want to be sure I'm not missing anything.
Cheers!
--Rev
Answer by fafase · Feb 21, 2015 at 08:15 AM
Personal POV following:
1/ Yes, UI is not meant to provide physics collision. It is just a visual interface witht set of events
2/ Yes, considering it is way easier to use the 2D framework
3/ Yes you would do that, the uGUI would provide the visual interface, the 2D framework would receive the info and apply it to the sprites.
4/ Yes if you do not want to provide any visual interface like left/rigth arrow.