• 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 arvzg · Feb 09, 2014 at 09:02 AM · 2dphysicsrigidbodycolliderhingejoint2d

HingeJoint with no rotation?

I'm implementing a 2D swinging mechanic, sort of on a rope/grappling hook. Looks like this:

alt text

As you can see, the collider is rotating along with the HingeJoint2D which is a problem for me.

I've put the sprite renderer on a seperate gameobject, so the sprite doesn't rotate with the swinging gameobject - which has a rigidbody2d and hingejoint2d that is created at runtime via script.

I tried putting the Box Collider 2D on the gameobject that has the sprite, which makes it not rotate with the swinging, but then it no longer collides with anything

I've also tried checking the 'Fixed Angle' on the RigidBody2D, however this completely disables the HingeJoint2D and the character no longer swings.

What can I do to keep the HingeJoint2D method for swinging, but have it not rotate the collider?

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

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

18 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

Related Questions

Sprite does not rotate with a CircleCollider2D 1 Answer

GameObject ignores collision while swinging from hinge joint 2D 4 Answers

Continuously moving rigidbody 2 Answers

rigidbody2d.AddForceAtPosition Doesn't Add Horizontal Movement? 1 Answer

Vertical push doesn't let the object fall down instantly 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges