Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Joint rope disability collision
Started by maximo97 Sep 26 2018 01:03 AM

2 replies to this topic
joint rope physics

Best Answer davebollinger , 26 September 2018 - 04:46 AM

box2d itself has a property of joints "collideConnected" that controls this, but Corona doesn't expose it.  it remains the default of false, so joined bodies won't collide with each other.  that's useful for ragdolls (for example) where you'd expect limbs to overlap, and similarly with most uses of joints that simulate "chains"/"ropes", but there are non-overlapping use cases where you'd potentially want that collision.  sometimes you can work around it by adding another body (and joint) in the middle of the existing two:  A-b-C, now A and C can collide, b is just a dummy.

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

maximo97

[GLOBAL: userInfoPane.html]
maximo97
  • Contributor

  • 223 posts
  • Corona SDK

Hi guys!

I noticed that if I connect two bodies with a rope joint they stop colliding. 

I checked and property as a "isSensor" has nothing to do with it. (I have no filters set on objects)

 

You can also see this in "Joints" that comes with Corona simple demo.

I think this is a voluntary behavior. But is there a way to enable collision?

I did not see anything about it in the documentation



[TOPIC: post.html]
#2

davebollinger

[GLOBAL: userInfoPane.html]
davebollinger
  • Corona Geek

  • 1,256 posts
  • Enterprise

  Best Answer

box2d itself has a property of joints "collideConnected" that controls this, but Corona doesn't expose it.  it remains the default of false, so joined bodies won't collide with each other.  that's useful for ragdolls (for example) where you'd expect limbs to overlap, and similarly with most uses of joints that simulate "chains"/"ropes", but there are non-overlapping use cases where you'd potentially want that collision.  sometimes you can work around it by adding another body (and joint) in the middle of the existing two:  A-b-C, now A and C can collide, b is just a dummy.


  • agramonte likes this

[TOPIC: post.html]
#3

maximo97

[GLOBAL: userInfoPane.html]
maximo97
  • Contributor

  • 223 posts
  • Corona SDK

Thanks so much. You're always helpful.

 

I had already thought about using a body C but I preferred to know if there were other more efficient solutions.

 

Since the answer is no, I used this system




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: joint rope, physics