• 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 carsons · Jun 15, 2015 at 06:00 PM · 2dcollisionrigidbodycolliderhingejoint2d

GameObject ignores collision while swinging from hinge joint 2D

I have an object with a rigidbody and a collider (the green square). When I click, a hinge joint is activated for this object, and it swings from where I clicked like a pendulum. However, when it is swinging, it ignores collision with the ground. When I release the mouse, and the hinge joint goes away, you can see the green box suddenly realizes "oops! That's ground!" and collides again. Here are some sample clips:

alt text

alt text

Any idea why this might be happening?

hinge-no-collision.gif (489.2 kB)
hinge-no-collision-2.gif (452.6 kB)
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 Alex la kitteh · Jan 18, 2016 at 09:53 AM 0
Share

Have you solved this yet? I'm having the same problem :/

avatar image Necktron · Apr 10, 2017 at 09:09 AM 0
Share

Exact same problem here, if I find a solution Ill post it ASAP

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Necktron · Apr 10, 2017 at 02:43 PM

I think I found an solution! I've used transform.position when I move the character, try using rigidbody2D.position, you wont ignore collision then. Transform.position is basiclly "teleportation". Not sure if this is the most optimized solution, but it's good enough I guess

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

Answer by logicandchaos · Oct 03, 2018 at 02:09 PM

Yes you are not supposed to move objects with transform while using unity physics because that will break the physics, I am having a similar problem though, I have 2 objects one with a box collider and rigidbody2d and one with a circle collider, it's the arrow on a spinwheel and the pegs they collide no problem the arrow is fixed in place and rotates when a peg hits it, works, but then I want the arrow to spring back to place but when I add the hingejoint2d the 2 objects no longer collide.. not sure why.. EDIT: Lol, I solved my problem there is a tick box in hingejoint2d enable collision which is off by default..

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

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Collider2D.IsTouchingLayers() delayed reaction 1 Answer

Collider2D/RigidBody2D not working 1 Answer

Dealing with 2D movement and collisions! 1 Answer

HingeJoint with no rotation? 0 Answers

Is there a solution to when colliders bypass? 2 Answers

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