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

Creating a Round Spiral in 3D environment

Discussion in 'Scripting' started by varian_wrynn_logosh, Jun 10, 2020.

  1. varian_wrynn_logosh

    varian_wrynn_logosh

    Joined:
    Oct 22, 2018
    Posts:
    5
    Hi guys. For my project I need to add this kind of mechanic to my game. I want to create a static object that changes depending on how long a key is held down. But this object must be a round spiral and It should extend upward depending on input. I did some research but I couldn't see any study on this subject. What kind of idea do you suggest,what should I do?

    BTW: This spiral object should start as a dot in the scene. And It needs to have a collider

    Thanks
     

    Attached Files:

    Last edited: Jun 10, 2020
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,797
    If you're talking 2D I would just use a line renderer and add points to it going around a circle with an ever-larger radius.

    If you're talking in 3D I guess do some procedural geometry creation?
     
  3. varian_wrynn_logosh

    varian_wrynn_logosh

    Joined:
    Oct 22, 2018
    Posts:
    5
    I am talking about 3D. I will look into procedural geometry creation tho I dont have any idea how to even implement this to unity. But its a start I guess... Thanks.

    I hope there are more different methods about this.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,797
  5. varian_wrynn_logosh

    varian_wrynn_logosh

    Joined:
    Oct 22, 2018
    Posts:
    5
    Thank you so much
     
  6. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,744
    TBH I think a LineRenderer is the easiest solution for 3D, too.
     
  7. varian_wrynn_logosh

    varian_wrynn_logosh

    Joined:
    Oct 22, 2018
    Posts:
    5
    Do you have something in your mind? Spiral need to have a collider btw I forgot the mention it
     
  8. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,744
    Oh, yep that changes things. A LineRenderer definitely won't work with a collider. Nevermind