Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 pango · Mar 06, 2015 at 02:01 AM · rigidbodyunity5lerpissue

Issue with Lerp and rigidbody in Unity5

I had a project in Unity4.6 in which you can move an object to left or right (a 3D project, not 2D). When changing direction, I had the object rotating smoothly with Quaternion.Lerp. But I recently tried using the project in Unity5, and everything is fine except for this. Actually the object, after several moves, or falling a bit on the ground, or also having a force applied, was continuously rotating (on all axis) even if the player then does nothing (not moving left nor right) and the object being alone on the ground, etc.

I should note that I have freeze rotation on Y and Z checked, but the object still rotates around those axis too.

I checked and when this happens, no lerp is applying on its rotation, but there is an angularVelocity that remains continuously. The most interesting is that if I remove all calls to Lerp, it seems that it doesn't happen anymore, and no rotation is then applied on freezed axis, as it should be.

Plus, when it's rotating like this, if I change anything in the rigidbody component in the editor, like even unchecking a freeze checkbox, removing gravity, etc. the rotation stops completely.

So i thought, maybe now I can't use Lerp and the rigidbody as I did in Unity4.6 (in 4.6. it was working, no continuous rotations), maybe due to the new physics engine. Which could mean I had written my code not so well.

Anyway, does anyone have an idea why sometimes the object keeps on rotating on its own, and how can I maybe force the continuous rotations to stop? Thanks!

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 pango · Mar 06, 2015 at 02:00 AM 0
Share

It's been hours that I try things, and I just found: this thread right after posting this question... Increasing angular drag seems to fix most of the continuous rotation issue. I'm still interested if anyone can explain why this happens...

avatar image meat5000 ♦ · Mar 06, 2015 at 02:03 AM 0
Share

I experienced a similar issue.

I used AddForce on a rigidbody cube for 1 frame, (0,1,0,Force$$anonymous$$ode.Impulse).

The cube shot into the air and started accelerating at a ridiculous speed.

Tried a fresh project to test, couldn't recreate. Went back to other project, working normally now.

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Lerp to target position in X amount of time 2 Answers

If a rigidbody is attached, should you always use AddTorque/AddRelative force for rotation/movement? 1 Answer

Position of skinned mesh with rigidbody on bones. 1 Answer

Issues moving rigidbody with animation(C#) 1 Answer

Kinematic rigidbodies collision 0 Answers


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