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 Ambrose998800 · Dec 21, 2015 at 12:49 PM · rigidbodyforcesfixed

Fix an object against forces

I have a hand of my player I can position somewhere in the world per drag and drop with a jointy arm on it (the players arm for egoview). Now, when I have positioned the hand, I want it to be fixed at that location for visual stability (the hand will grab there). But when I turn my player due to looking around, the joints of the arm adds a force to the hand and make it move/wobbling.

I've tried to make the hand isKinematic, to freeze it's position and rotation, iterate the position per script, increase mass and drag, set velocity/angularVelocity to Vector3.zero, lock the rotation per surface normal detection... nothing works.

How can I make it firm as a rock?

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
1

Answer by wibble82 · Dec 21, 2015 at 12:57 PM

Making the hand's rigid body have isKinematic=true is definitely the correct thing to do, though you may need to set its angular/linear velocity to 0 as well if it's already gained velocity.

If that's not working then perhaps something elsewhere in your game is changing its position/velocity/isKinematic setting?

Comment
Add comment · Show 3 · 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 Ambrose998800 · Dec 21, 2015 at 01:05 PM 0
Share

The problem is, as soon i make the hand Is$$anonymous$$inematic = true, it starts to drift away from its position and the hand keeps its is$$anonymous$$inematic-state. Perhaps because it is a child of a non kinematic object?

I need the arm still movable...

avatar image wibble82 Ambrose998800 · Dec 21, 2015 at 01:17 PM 0
Share

That is surprising - it sounds like something else is changing its position a little bit each frame. Perhaps there are some subtle issues relating to the hierarchy but I wouldn't have thought so. Worth seeing what happens if you unparent it when you set it to kinematic though (just to see what happens).

avatar image Ambrose998800 · Dec 21, 2015 at 06:16 PM 0
Share

I could do it by ripping the hand away from the arm (in the hierarchy). Thats bad just because of the way I have to handle it. $$anonymous$$eans a lot more variables to preset in the script just for one operation (I try to keep it as simple as possible).

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

33 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

Related Questions

Making a bubble level (not a game but work tool) 1 Answer

Adding more forces vs adding sum of forces 2 Answers

Multiple rigidbody coming to rest on top of rigidbody causing strange forces. 0 Answers

How can I simulate a short-distance attraction between RigidBodies A and B, with the mutual pull always being between the center of A and the closest point in B's collision mesh? 0 Answers

How to levitate a rigidbody and still use gravity on him at any time 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