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. The 2022.2 beta is now available for testing. To find out what's new, have a look at our 2022.2 feature highlights.
    Dismiss Notice
  3. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
Dismiss Notice
Submit bug reports tagged with #Beta2022Win_Unity when you encounter unknown issues while testing the 2022.2 betas for a chance to win a year of Unity Pro. For more information, have a look at our Beta Sweepstakes Announcement.

Rigidbody.MovePosition alternative

Discussion in 'DOTS Physics' started by kexar66, Oct 28, 2020.

  1. kexar66

    kexar66

    Joined:
    Feb 27, 2013
    Posts:
    43
    Hello, is there any Rigidbody.MovePosition and Rigidbody.MoveRotation alternative for PhysicsBody?

    Thanks
     
  2. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    The equivalent is moving the body with its velocity or AngularVelocity. There is a helper function in PhysicsVelocity for this: PhysicsVelocity.CalculateVelocityToTarget
     
    Baggers_, steveeHavok and kexar66 like this.
  3. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
  4. toomasio

    toomasio

    Joined:
    Nov 19, 2013
    Posts:
    166
    Is there a simple way to do this so it moves similar to Translation.Value += Velocity?

    I would like to move the position of a rigidbody, while at the same time, the rigidbody reacts normally to gravity and the built in systems. I know there is PhysicsVelocity.Linear += Velocity, but this creates a sliding movement vs snappy controls.
     
unityunity