Author Topic: Multi-toucb iOS - Show touch on screen?  (Read 2712 times)

Majicpanda

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
Multi-toucb iOS - Show touch on screen?
« on: February 12, 2013, 02:16:46 PM »
Is there a way to instantiate a Prefab GO onto your screen for every touch event easily? I want to force collisions between a touch collider object instead of using OnClick() because it's not working well on iPhone right now for my game with small objects and people with big fingers.  The precision is just way too small, so I'd like to make a GO the size of my projectile I'm expecting users to click on as they fly across the screen and instead use collision.

Is this possible? I'd need them to be able to touch multiple times and instantiate GameObjects into the world... the tricky part is, how do you tie this into a touch id so that it can be owned by that touch so that they can swipe their finger across the screen and have it follow?

I would imagine you instantiate the Prefab, store the touch id into the cloned touchCollider or whatever game object and run a for loop for all touches and process the code?  nGUI doesn't provide any easy way to do OnHover() on iOS so this is still causing me major grief by having to do my own raycasting so that users can "swipe" objects instead of click on them.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Multi-toucb iOS - Show touch on screen?
« Reply #1 on: February 12, 2013, 02:39:47 PM »
You could use OnDrag.