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
1
Question by rajiv.mehta.unity · May 29, 2012 at 12:30 PM · collisionjoints

Reg. 'hit me toys' effect

Hi I want to apply 'hit me toys' like effect to my Domino object but after hit it doesn't raise again like 'hit me' do.For that i have use hing joints but it's not work very well because it require so many calculations.Any suggestion pls.

Rajiv

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by aldonaletto · May 29, 2012 at 12:56 PM

Let physics do the job for you: set the rigidbody.centerOfMass below the rigidbody - this will produce a self-righting effect:

function Start(){
  // sets the center of mass 2 units below the object's center:
  rigidbody.centerOfMass = Vector3(0, -2, 0);
}
You will need a hinge joint only if you don't want the object to slip when hit.
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 rajiv.mehta.unity · May 30, 2012 at 05:01 AM 0
Share

Thanks Aldo.Actually i'm working on do$$anonymous$$o rally kind game so the problem is that i want to design do$$anonymous$$o object in such a way that it attach to the ground and fall in the speed of real do$$anonymous$$o as well force can be come any direction e.g from backside-forward side of do$$anonymous$$o. So i've use hing joints and on collision do$$anonymous$$o fall it self. but it require so many calculation for settings join pls suggest any alternatives.

avatar image aldonaletto · May 31, 2012 at 01:34 PM 0
Share

So, you don't want the self-righting behaviour, only the do$$anonymous$$o toppling effect. Real world do$$anonymous$$oes don't have any joint: they just fall over the next do$$anonymous$$o, and rigidbodies would behave the same. Could this work for you?
But if you really need a hinge joint, just set its anchor at the lower center - at least with Unity cubes scaled to look like do$$anonymous$$oes (scale 0.5, 1, 0.15) it works very well: set the hinge joint anchor to (0, -0.5, 0) and the axis to Vector3.right.

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

6 People are following this question.

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

Related Questions

Stop joint from jittering when target is on other side of collider 0 Answers

How to add joints on an object in specific locations and allow the object to connect to another object if it touches one of the specific locations? 0 Answers

Joint or Collision without rigidbody 0 Answers

How to implement better (more humanlike) joint limits? 0 Answers

Apply force and torque on different collider enter 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