Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Avagantamos

Pages: [1]
1
NGUI 3 Support / DragDropItem + UICamera Rotation Issue
« on: September 07, 2016, 10:24:48 AM »
Hello!

I have encountered an issue with the DragDropItem script when rotating the camera -180 degrees on the Z axis (essentially flipping the screen).  When the player attempts to drag an item while the camera is at this position the item moves in the opposite direction of the cursor. 

For example if I drag an item up and to the left it will drag it down and to the right.  The cursor with be at the correct position but the item will essentially be in the opposite location.  I have tried using a multiple camera setup and it still doesn't seem to respond correctly.  I have also tried messing with every camera setting available.  I feel like this is something simple that I'm just missing.   

Any help would be greatly appreciated!

2
Hello!  I tried reading through the NGUI documentation and past forum threads, but I can't seem to understand how to get UIPopupList to execute a function when a value is selected.  I can show you what I have tried:

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class ShamanBaseScript : MonoBehaviour {
  5.  
  6.  
  7.         public UIPopupList popUP;
  8.  
  9.        
  10.         void Update () {
  11.  
  12.                 if (popUP.value == "Add 1 Mana") {
  13.                     transform.rotation = Quaternion.Euler (0, 0, -90);
  14.                 }
  15.  
  16.                        
  17.         }

All I'm trying to do is say: When you select the 'Add 1 Mana' option in the popup list turn the object -90 degrees.  I feel as though there is something I'm missing.  Past threads have spoken about OnSelectionChange(); and onChange  but I have no idea how to implement these.  I would really appreciate a simple example.  Thank you!

Pages: [1]