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 HyperStream · Mar 01, 2021 at 12:22 PM · cube

cube rotating for no reason, how can I stop this?,Object Rotating for no reason, how do I stop it?

So, I am very new to Unity. I have a "Player" which is a cube moving across a plain with 0 friction. The cube is being moved by a forward force. For some strange reason, the cube will have a very slight rotational velocity as it is moving forward, I would just disable rotation but I want the cube to display physics as it collides with objects. I have tried only enabling rotation once a collision with an object has occurred but as the collision has already happened the physics reaction is not correct. Does anybody know how to remove this slight rotation that is happening to this cube?

Comment
Add comment · Show 15
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 Llama_w_2Ls · Mar 01, 2021 at 01:07 PM 0
Share

Is the ground also frictionless? If not, the cube will slightly tip, as you add force to it.

avatar image HyperStream · Mar 01, 2021 at 01:25 PM 0
Share

@Llama_w_2Ls, Sorry, was no specific enough it's rotating slightly on the x axis not the y. And yes the ground is frictionless

avatar image pauldarius98 HyperStream · Mar 01, 2021 at 01:31 PM 0
Share

What method do you use to move the object?

avatar image HyperStream · Mar 01, 2021 at 01:45 PM 0
Share

@pauldarius98 Rb.addforce(0, 0, forwardforce);

Rb is my variable for the cubes RigidBody. Forward force is a float set to 1000 currently.

avatar image pauldarius98 HyperStream · Mar 01, 2021 at 01:59 PM 0
Share

And your physics material properties? Is the friction set to 0 for static and dynamic? or just for dynamic

avatar image HyperStream pauldarius98 · Mar 01, 2021 at 02:03 PM 0
Share

Not at my computer right now so can't check but I'm pretty certain both are 0

avatar image HyperStream · Mar 01, 2021 at 01:46 PM 0
Share

This occurs in the fixedupdate section by the way

avatar image SmallLion · Mar 01, 2021 at 01:52 PM 0
Share

If there are no solutions, use rigidbody 'Freeze rotation' :)

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by pauldarius98 · Mar 01, 2021 at 02:08 PM

Ok, so after reading the comments i think that the problem could be that either:

  1. Static Friction was not set to 0 (for the material on the moving obj)

  2. Friction Combine was not set to Minimum (for the material on the moving obj)

If that is not the case, then please provide further details on the object material, ground material and other factors that could influence the rotation of the object

Comment
Add comment · Show 2 · 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 HyperStream · Mar 01, 2021 at 02:12 PM 0
Share

I will have a look later on because I'm not entirely sure what friction combine is so that may be the cause, thankyou. However even if friction on anything isn't set to 0, my issue is not the cube toppling over but instead twisting on its base, the base of the cube never loses contact from the floor it is just slightly rotating to the left, if I am only applying a force directly forward, then there shouldn't be any other factors that could cause this cube to turn to the left

avatar image HyperStream · Mar 01, 2021 at 02:13 PM 0
Share

I will obviously try changing these settings though

avatar image
0

Answer by Okmy · Jun 03, 2021 at 09:09 PM

@PaulDarius98 Thank you mate, I was kind of stuck in my development for the same reason, my cube that has a forward force was moving to the right and rotating to the "left" on his own. I just set the Friction Combine to minimum and it worked.

Comment
Add comment · 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

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

114 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 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

Cube material is briefly blue 1 Answer

Make a Cube Move, through rotation! 1 Answer

Putting text on a 3D object? 3 Answers

simple 360 degree Cube-rotation around y axis 2 Answers

how to subdivide and smooth a cube in unity 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