Welcome,
Guest
. Please
login
or
register
.
January 23, 2025, 02:15:08 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Non Square Buttons / Colliders
« previous
next »
Print
Pages: [
1
]
Author
Topic: Non Square Buttons / Colliders (Read 9896 times)
SeanP
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Non Square Buttons / Colliders
«
on:
April 19, 2012, 01:55:09 PM »
I'm looking at making a Circular menu, that uses wedged shaped buttons, are there any means for making colliders that would fit non square shapes?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Non Square Buttons / Colliders
«
Reply #1 on:
April 19, 2012, 03:41:34 PM »
NGUI doesn't know nor care what colliders there are. You can use mesh colliders with it and it'll work just fine. I suggest just making a flat sphere collider.
Logged
SeanP
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Re: Non Square Buttons / Colliders
«
Reply #2 on:
April 19, 2012, 04:34:15 PM »
alright cool, any suggestions on making irregular colliders?
another question I suppose, how do I make it so that 3D UIs scale properly with different aspect ratios?
«
Last Edit: April 19, 2012, 04:36:00 PM by SeanP
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Non Square Buttons / Colliders
«
Reply #3 on:
April 19, 2012, 04:44:35 PM »
Make colliders in your modelling app same as you would for any game object.
Use UIAnchor to attach parts to sides of the screen, that's about it.
Logged
SeanP
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Re: Non Square Buttons / Colliders
«
Reply #4 on:
April 19, 2012, 04:56:55 PM »
hmm, I have been but they are not staying at the sides when I say switch from 16:9 to 4:3, relaunching between switching as well.
this is how my ui is structured.
UI Root
- UI Camera
- - Anchor - Top Left
- - - Panel
- - - - Elements in Pannel
Logged
SeanP
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Re: Non Square Buttons / Colliders
«
Reply #5 on:
April 19, 2012, 09:24:21 PM »
Also, thought you might like to see what we have been doing with NGUI.
www.KineticVoid.com
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Non Square Buttons / Colliders
«
Reply #6 on:
April 20, 2012, 07:03:40 AM »
Holy crap that looks awesome. I love space games!
Where in that hierarchy is your collider attached? It should be on the widget.
Logged
SeanP
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Re: Non Square Buttons / Colliders
«
Reply #7 on:
April 20, 2012, 08:43:01 AM »
I figured it out thanks to your reply! for whatever reason I didn't realize that I needed to put a collider on the background panel.
I am very happy with NGUI, and your support, don't regret the purchase at all!
edit:
Looks like the issue is still here,
http://i.imgur.com/eSHbl.png
http://i.imgur.com/uPPNT.png
one is 16:9 the other 4:3 in the 4:3 parts of the sides are still too far off. This is the shipyard ui, for our game.
Here is an image of the setup - its a bit wide, parts of the editor are on another screen.
http://i.imgur.com/h8HTY.png
«
Last Edit: April 20, 2012, 09:08:17 AM by SeanP
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Non Square Buttons / Colliders
«
Reply #8 on:
April 20, 2012, 09:09:16 AM »
Check the UIAnchors you've used. It's something with how you've offset the side-anchored panels. Check the first example showing UIAnchor to see how yours is different.
Logged
SeanP
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Re: Non Square Buttons / Colliders
«
Reply #9 on:
April 20, 2012, 01:06:38 PM »
I cant find a single one of your examples / tutorials that uses a 3D camera with anchors on the sides.
here is my top left anchor for reference
http://i.imgur.com/DuBO5.png
«
Last Edit: April 20, 2012, 01:41:24 PM by SeanP
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Non Square Buttons / Colliders
«
Reply #10 on:
April 20, 2012, 01:43:50 PM »
Er... but your UI looks 2D, not 3D. Why are you using a 3D camera for it?
Logged
SeanP
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Re: Non Square Buttons / Colliders
«
Reply #11 on:
April 20, 2012, 02:07:41 PM »
Because it has depth!
http://i.imgur.com/w0syt.png
some parts rotate, some parts move, etc..
the radar actually tracks objects in 3D, kinda hard to show without a video.
This one is while the scene is playing
http://i.imgur.com/N1592.png
I suppose I can mix 2d and 3d elements, but what if I want a 3d element anchored to a side?
«
Last Edit: April 20, 2012, 02:10:30 PM by SeanP
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Non Square Buttons / Colliders
«
Reply #12 on:
April 20, 2012, 02:18:08 PM »
2D tends to be a lot easier to work with in general. Anchoring objects to sides of the screen in 3D UIs was possible back in December, but I've changed the anchoring system since then, so it might need work to make it work in 3D again.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Non Square Buttons / Colliders