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. Dismiss Notice

Slash/Sweep inside of a gameobject.

Discussion in 'Scripting' started by nicklowkc1, Jan 20, 2021.

  1. nicklowkc1

    nicklowkc1

    Joined:
    Feb 27, 2019
    Posts:
    28
    I am trying to achieve something like slashing and sweeping inside a circle sprite. I try something like edge collider2d attach to line renderer and the gameobject has a circle collider attached to it.
    If i swipe from outside and will have trigger ontriggerenter2d and plus one to score.
    However, I wanted to do something like I can swipe different direction continuously inside the sprite. For each different direction it will add one to score. Currently I can only do with ontriggerenter2d but it can only swipe once inside the circle.

    Any advice I can achieve something like above?
     
  2. nicklowkc1

    nicklowkc1

    Joined:
    Feb 27, 2019
    Posts:
    28
    Any help?????
     
  3. TheOtherUserName

    TheOtherUserName

    Joined:
    May 30, 2020
    Posts:
    136
    Can you post a picture of your scene? That may help understand what you are trying to do.