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

Advance moving calculation

Discussion in 'Scripting' started by SlayerOfGod, Oct 21, 2013.

  1. SlayerOfGod

    SlayerOfGod

    Joined:
    Sep 22, 2012
    Posts:
    8
  2. SlayerOfGod

    SlayerOfGod

    Joined:
    Sep 22, 2012
    Posts:
    8
    I had to create a new topic to figure it out it seems lol.

    Change :
    distCovered += (Time.time - startTime) * movementSpeed;

    instead of recalculating
     
  3. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    in the example code in that link, to say move at half the speed... you would (wait for it)

    set speed to 0.5... for example..