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 make parabolic movement that isn't relied on physics

Discussion in 'Scripting' started by Zukas, Oct 11, 2015.

  1. Zukas

    Zukas

    Joined:
    Dec 17, 2013
    Posts:
    40
    Hey gals and lads,

    I want to make parabolic movement for 2D fish in my game. All the materials I find online uses either velocity, gravity, more as like actual thrown/shot object. I need something really simple, favourably with variables that could be set for jump distance, jump height and speed. I also had an idea for using sine wave, but I really have no idea how that could work.
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Gravity and parabolas are defined by a square curve, rather then a sin wave. What exactly is your use case? Do you want to get the path in advance or do you want to generate it as the object moves?
     
  3. Zukas

    Zukas

    Joined:
    Dec 17, 2013
    Posts:
    40
    I'd like to generate it in advance. I've brought up sin wave because it can resemble a wave aswell, thought it might be just another method to get my object jump/move in a parabolic form.