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 Kawalyn · Apr 22, 2020 at 03:19 PM · physicsrigidbody

Rigidbodies get huge amount of velocity when clipping into other Rigidbodies

Hey,

i'm currently stuck at a physics related issue, wondering why it happens and how to solve it.


In my game you're able to drive a heavy construction vehicle. At some places there are dynamic objects you can collide with, like a stack of europalletes. When you drive into these the physics work reasonably fine except when they're not. Mostly eveverything just slowly gets pushed outwards but sometimes when there is no way to go for a certain pallete it suddenly gets pushed away insaaaanely fast. It can end up flying away 5 to 10 meters, sometimes it even shoots way into the sky like a rocket.


I thought about clamping the velocity or adding a force in the opposite direction.

 if (_rb.velocity.magnitude > 5f)
         {
             _rb.velocity = _rb.velocity.normalized * 5f;
         }

This was my quick and dirty way of simply limiting the speed for testing purposes but even with that being checked every update the "shooting away" physics can happen. Maybe not as drastically because it quickly realizes that the object is too fast and clamps it's velocity, but i've still seen palletes "teleporting" 10 meters before they get slowed down.


Tried to search for answers online but so far I've come up empty. Any ideas why this is happening in the first place? Kind of feels like a physics engine bug to be fair.


Thanks in advance, have a nice week!

Kawa

Comment
Add comment · Show 1
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 Captain_Pineapple · Apr 22, 2020 at 03:41 PM 0
Share

have you tried different general physics settings? also do you have continuous dynamic checked on said rigidbodys?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by bombombambam · Apr 22, 2020 at 03:36 PM

Maybe mass of the vehicle is too big?

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
avatar image
0

Answer by Bunny83 · Apr 22, 2020 at 08:17 PM

Well, first of all how do you move your construction vehicle? Do you properly move it through physics? How many objects are involved when those "glitches" happens? Stacking several objects and pushing with great force onto such a stack you can get huge forces bouncing between the objects. You may want to increase the drag of your objects. However such extreme spikes most likely can't be avoided.


What is your mass ratio between your different objects? Unity / physX recommends to not go over 1000 but it's better to stay around a ratio of 100. Note that in the real world such reactions do actually exist. However most objects in the real world are not rigidbodies. Europalettes which are mainly made out of wood would simply bend or break if the forces gets too high. Also their "mass to cv" ratio is relativels low so if you accelerate such a palette in the real world it quickly slows down.


Unfortunately we don't have softbody physics nor realistic drag / air friction. You could implement your own more realistic drag.

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

237 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I connect multiple spheres using joints and make a character? 1 Answer

Shooting a cannonball. 6 Answers

Solar System Simulator Orbits Not Working 2 Answers

My object falls through terrain. 8 Answers

How may I observe expected physical interactions while using Rigidbody.MoveRotation()? 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