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

How to draw spheres on a curve with the same straight line distance between each other

Discussion in 'Scripting' started by KevinGGames, Oct 30, 2015.

  1. KevinGGames

    KevinGGames

    Joined:
    Aug 5, 2015
    Posts:
    7
    As the title states, I am currently having trouble figuring out how to approach this problem. More specifically, I am currently using the using the equation y = mx^2 + ax. The problem is that if I increase x by a certain rate each frame, the spheres start to get spread out as the y starts growing way more rapidly. This makes the actual distance between the spheres different every time a draw a sphere. I have tried to potentially solve for x2 in the distance formula so i can find the new y, but this is proving to be pretty difficult for me. Can anyone point me in the direction of a solution for this? Sorry if this is a newb question, I am pretty new here and really just need some help!

    A little more background information is that the spheres are not moving, so having them being spaced properly is a most, if not the curve looks dense at the beginning and super spaced out towards the end. If you need more background, please just post on what specifically you need and I would be glad to add it! Thanks!
     
  2. KevinGGames

    KevinGGames

    Joined:
    Aug 5, 2015
    Posts:
    7
    This is only in 2d! Forgot to mention that. So no Z axis.
     
  3. KevinGGames

    KevinGGames

    Joined:
    Aug 5, 2015
    Posts:
    7
    Still really need help!!!