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

[Solved] Moving objects via Rigidbody.velocity += amount

Discussion in 'Scripting' started by Deleted User, May 27, 2015.

  1. Deleted User

    Deleted User

    Guest

    I have a method "Move" that adds velocity directly to an object to move it. No update no nothing. Now, the object still moves continuously. When does this take place? In Update or FixedUpdate? I would imagine in FixedUpdate. I've never used FixedUpdate before. Any problems that could arise as a result? (i.e. object moving faster/slower than expected due to lag, stutters, etc.)?
     
  2. OlavoDias

    OlavoDias

    Joined:
    May 2, 2015
    Posts:
    13
    FixedUpdate is where it takes place. I don't think anything will go wrong by changing your physics from FixedUpdate.
     
  3. Stef_Morojna

    Stef_Morojna

    Joined:
    Apr 15, 2015
    Posts:
    289
    From what I know you can change the velocity/addForce etc, pretty much everywhere you want.

    But if you want something like acceleration use FixedUpdate.