Author Topic: Problem+Confusing with ScrollPanel (2nd camera)  (Read 3021 times)

RiRin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Problem+Confusing with ScrollPanel (2nd camera)
« on: October 21, 2012, 01:31:14 AM »
I am new to NGUI.
So far, I am have happy with it.
I want to make scrollpanel without scroll bar so I tried on 2nd camera type.

I made scrollpanel move but when I pressed button(as an item) inside list of scrollpanel (UITable),
the button had not respond. I had checked the collide and test outside the scrollpanel to see does button item work or not?
Button worked fine outside scrollpanel. I applied script "OnClick" and "OnSelect" function to the button item but I still cannot activate button.

Moreover, I do not understand how to set spring position for the first and last item. I found that the spring position script was created when the first or last item hit the edge of viewport.
Now, it seems spring back to half of view like the following drawing.
============
        XXXXXX  XXXXXXX
============

Can anybody help?  How do I fix it?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem+Confusing with ScrollPanel (2nd camera)
« Reply #1 on: October 21, 2012, 03:25:28 PM »
If you created a 2nd camera, make sure that it has UICamera script on it, or events won't work.

I'm not sure what you mean with the second part of your question. I suggest looking closer at the provided example to see what you did differently.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Problem+Confusing with ScrollPanel (2nd camera)
« Reply #2 on: October 21, 2012, 05:55:46 PM »
Don't use a second camera unless you have 3d elements you want to track with 2d elements (like models in a scroll view). Just use a scroll panel like in the examples.

basil_11

  • Guest
Re: Problem+Confusing with ScrollPanel (2nd camera)
« Reply #3 on: July 09, 2013, 01:05:15 AM »
Hi
Im a bit new in NGUI,

anyone can help me fix my problem :(

Im doing example 8 for scroll camera and i Do have 2nd camera for my 3d Models

2nd Camera Components are the Following:
- Camera
- UICamera
- UIViewPort
- UIDragggable Camera

I can see the result in the "Game" but when try to Play it,
it seems the Second Camera cant Render the things to be rendered..

Cant also Drag :(