Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Anyone else use TouchKit?

Discussion in 'Scripting' started by tmanallen, Mar 16, 2014.

  1. tmanallen

    tmanallen

    Joined:
    Nov 8, 2009
    Posts:
    395
    Just wondering if anyone else use touchkit? I am trying to figure out the swipe on a particular object and not just all over the screen, like you post a script on the object you want to receive the swipe.


    Thanks
     
  2. tmanallen

    tmanallen

    Joined:
    Nov 8, 2009
    Posts:
    395
    Has anyone on this forum or some other forum managed to get this to work?
     
  3. Gustav_Bok

    Gustav_Bok

    Joined:
    Dec 6, 2012
    Posts:
    35
    I don't see why you need a plugin to do a raycast and add a certain script to the object hit :) What do you want to do really?
     
  4. tmanallen

    tmanallen

    Joined:
    Nov 8, 2009
    Posts:
    395
    Gustav_Bok thanks for the reply first off, what I am trying to do is a swipe function on certain object, I have posted several scripts on swipe and it worked at first and I was using raycasting, but now it fails in epic fashion. I found touchkit and it does swipe but for the entire screen and not just on a particular object. Any Ideas on how to achieve this?
     
  5. Gustav_Bok

    Gustav_Bok

    Joined:
    Dec 6, 2012
    Posts:
    35
    Are you looking to have swipe for a particular object,like on touch select the object, and the swipe give it some force? If you tell me what the interaction is supposed to do I can better help you.

    If your raycasting worked before I'd think it stopped to work because of overlapping gameobjects, have you tried RaycastAll?

    https://docs.unity3d.com/Documentation/ScriptReference/Physics.RaycastAll.html

    If you just tag your swipable objects you can sort them out easily and apply whatever you want on them.