Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 SimonTS · Sep 10, 2014 at 07:33 PM · physicsjointhinge jointhinge

Weird behaviour with hinge joint

I am trying to create a kind of platformer game where you play a little bug flying around in a tree.

My player object is currently a simple box with a box collider. It is a rigidbody which is controlled using AddForce (see below).

Naturally this tree has branches at multiple locations which are supposed to react to the player (or other physics objects) touching it. These branches are assembled from smaller sprites, each of which has its own MeshCollider. A branch has one rigidbody component at the top level together with a springy hinge joint to make it react to other physics objects.

This works so far, except in some special cases. When two (or more) weights are touching my branch and my player object touches a collider close to the branch (not the branch or the weights themselves!!), it behaves as if the weights somehow lose their mass.

I've recorded a video to illustrate the problem: http://youtu.be/AXbuSEA3XQc

You can see the branch and the two spherical weights on top and my player controlled object at the bottom. As you can see the player never touches the branch. The player touches some other objects in between, all of which are non-physical and marked as static. This does not occur when only one (or no) weight is used. Everytime I touch the big static branch below my physical branch, the physical branch begins to return to its inital position, presumably because of the hinge spring trying to return to its initial position. As soon as I move my player object away the branch starts behaving normal again.

I've tried to reduce this to simple boxes without anything else but still get the same behaviour. The only time force is applied anywhere in the project is in my player control script, which more or less applies user input as a force directly to the player object.

 void FixedUpdate () {
     Vector3 force = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
     rigidbody.AddForce (force * Time.fixedDeltaTime * forceFactor);
 }

At no point is there any force applied to any other objects from code.

I tried playing around with all the physics settings but still got the same result.

I also tried replacing my hinge joints with equivalent configurable joints but they still behaved the same.

I am out of ideas, any help would be appreciated!

Comment
Add comment · Show 2
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 ImDev · Dec 24, 2015 at 02:05 PM 0
Share

Hi,Im also facing same issues.. did you got solution for this???????/

avatar image GrEnAdE · Aug 05, 2016 at 11:20 AM 0
Share

Same here, seems like UT doesnt give a ---- or we need to use our own joint scripts :P

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Disable weight "inheritance" when using HingeJoint2D? 1 Answer

Hinge Joint? Unconstrained. 1 Answer

Make a hinge joint stay firmly in place 4 Answers

Hinge Joints that Don't Limit? 0 Answers

Why are my hinge joints inaccurate? 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