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 Leroterr · Jun 28, 2014 at 07:56 PM · collisionphysicsrigidbodycollidergravity

Objects rotating after falling on another object with Physics & Gravity?

How can I have a realistic physic effect with gravity so that when the object falls on a slope, it will also rotate depending on the slope.

For example. here is what I want to happen: alt text

But this is what's happening with my current setup: alt text


Here is my component setup for the **blue box object** that is falling on the red slope.

And here is my component setup for the **red slope** that the blue box object is falling on.


Is there anything I need to do for this to happen?

If so, what is it? And how?

Google doesn't help, probably because I didn't know what to search for in the first place, I don't know what this certain problem is called.

Thanks!


EDIT:

And yeah, it slides down without rotating.

And it seems to only happen when I put the collider and the rigidbody on their parent. My object has a lot of 3d parts and it's all on 1 parent. When I put the collider and rigidbody on the parent, it does that. But when I put the collider and rigidbody on only one part (one of the child), it does what I wanted.

I could put a rigidbody and collider on every child, but when it falls, it makes all of them get seperated to each other. I want them to stick together and fall as I want them to fall.

How do I this?

Thanks :)

2.png (16.2 kB)
1.png (13.1 kB)
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 Owen-Reynolds · Jun 29, 2014 at 03:04 PM 0
Share

Wait -- so the blue thing isn't a box with a box collider, it's something more complicated?

Clearly, to me, the problem is in how the blue box is built. Look up compound colliders. The Q has gotten sidetracked enough that it might be better to repost, with a more descriptive title, and explain the set-up of the falling object.

1 Reply

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

Answer by Lylek · Jun 28, 2014 at 08:53 PM

When the box hits the slope does it just stick there, or does it slide down without rotating? You don't have a character controller on it, do you? And you shouldn't need a rigidbody on the slope.

Try creating a new scene. Add a plane, and angle it for a slope. Add a cube, and give it a rigidbody. You shouldn't need to adjust anything. Position the cube above the plane and press play, and it should tumble down the hill.

Comment
Add comment · Show 8 · 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 Owen-Reynolds · Jun 28, 2014 at 10:10 PM 0
Share

To repeat, the normal Unity set-up gives the effect you want. The blue box should bounce a bit, tip over, maybe start to flip over, but rock back, slide .... . It should look pretty good (depending how far it falls.) No matter what, it should always tip sideways.

$$anonymous$$aking it "do a road runner," like your 2nd picture set, takes more work.

Just recheck the set-up, or make a bare $$anonymous$$imum. $$anonymous$$aybe the red plane has the box collider flat, not tilted ... .

avatar image Leroterr · Jun 29, 2014 at 04:18 AM 0
Share

It slides down without rotating. And yeah, I don't have a character controller on it.

I'll try removing the rigidbody on the slope.

Thanks!

avatar image Leroterr · Jun 29, 2014 at 04:34 AM 0
Share

It seems to only happen when I put the collider and the rigidbody on their parent. $$anonymous$$y object has a lot of 3d parts and it's all on 1 parent. When I put the collider and rigidbody on the parent, it does that. But when I put the collider and rigidbody on only one part (one of the child), it does what I wanted.

I could put a rigidbody and collider on every child, but when it falls, it makes all of them get seperated to each other. I want them to stick together and fall as I want them to fall.

How do I this?

Thanks :)

avatar image Lylek · Jun 29, 2014 at 04:55 AM 0
Share

Well, I'm not exactly sure "how you want them to fall", or what your set up is, and what all is falling where. Can you explain more?

avatar image Kiwasi · Jun 29, 2014 at 06:45 AM 1
Share

Unity gets weird when rigidbodies are parented to each other. Avoid this at all costs. You can achieve the same affect of parenting by using joints.

Show more comments

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

23 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

Related Questions

How to properly move a rigidbody/collider? 2 Answers

Layers are colliding even though they are set to ignore each other 1 Answer

How to setup character Collisions? 2 Answers

How do i get OnTriggerStay2D to work? 1 Answer

Collision causes weird effects 2 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