Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by AlbertoVgdd · Jun 18, 2017 at 12:03 AM · rigidbodyinterpolation

Rigidbody Interpolation doesn't work in my game

Hello everyone,

I am stuck trying to move the character of a third person game. I am using FixedUpdate() to move the player and LateUpdate() to move the camera, but I can not get rid of the "choppy" movement of the player in the scene. The character's rigidbody is not kinematic, and interpolate mode is set to interpolation. (Changing TimeStep from 1/50 to 1/144 almost solves the problem, but it is not a efficient solution.) I am using version 5.6.1f1 and Windows 10.

Can anyone help me? Thank you.

EDIT I though that adding a gif may help you understand my problem. http://i.imgur.com/siNRywX.mp4

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hexagonius · Jun 18, 2017 at 04:38 AM 0
Share

How do you move him?

avatar image AlbertoVgdd hexagonius · Jun 18, 2017 at 07:26 PM 0
Share

I tried almost everything I known, I am currently using these

     void FixedUpdate(){

     //m_Target.Translate(m_$$anonymous$$ovementDirection * m_$$anonymous$$ovementSpeed * Time.fixedDeltaTime, Space.World);

     m_TargetRigidbody.$$anonymous$$ovePosition(m_Target.position + m_$$anonymous$$ovementDirection * m_$$anonymous$$ovementSpeed * Time.fixedDeltaTime);

}

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by ryanmillerca · Jun 23, 2017 at 12:39 PM

I can think of two possible causes.

One, you may need to enable interpolation on your rigidbody. Physics engine update defaults to ~50 fps while your game may run faster than that, causing stuttering. Interpolation addresses this. There is a bug with interpolation in Unity 5.6 - so it may not work right if you're on that version.

Two, you may be polling input on FixedUpdate. Best practice is to poll input on Update(), Move Physics objects on FixedUpdate(), and Update your camera on LateUpdate(). Sounds like you're doing 2/3 properly, just check the input.

Good luck!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlbertoVgdd · Jun 23, 2017 at 10:49 PM 0
Share

I am doing everything you wrote before. The problem remains, so I think I'll have to wait for Unity to solve this problem. Thank you very much!

avatar image
1

Answer by Squeekpro107 · Jun 18, 2017 at 06:24 AM

Do you have animations running?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlbertoVgdd · Jun 18, 2017 at 12:04 PM 0
Share

Yes I do. I just tried to remove the mesh and the animator from the character (I replaced them with the standard capsule mesh) but I still get the same effect. I am going to edit the question to add a gif.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

85 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Collision Detection on Rigidbody with Interpolation and Rigidbody with Extrapolation is different 0 Answers

Kinematic rigidbody with interpolation issue 0 Answers

Interactive cloth interpolation? 0 Answers

Rigidbody 2D with interpolate = cant rotate object 0 Answers

Get Interpolated rigidbody velocity 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges