Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Balls, to sit on Rope
#1
Hi there, 
I am a newb here. I have Obi Rope and Obi SoftBody. 


What I would like to achieve is a situation where I can have a rope, attached at two ends, horizontal to ground, but where the tricky part is, that I can drop balls (softbody or not), onto this rope and tho there are physical reactions to each other, the balls sit on the rope, as they come to rest. 

I realize this is perhaps more of a 2D thing, but how can I achieve this?
Reply
#2
(17-08-2022, 06:24 PM)Renman3000 Wrote: Hi there, 
I am a newb here. I have Obi Rope and Obi SoftBody. 

What I would like to achieve is a situation where I can have a rope, attached at two ends, horizontal to ground, but where the tricky part is, that I can drop balls (softbody or not), onto this rope and tho there are physical reactions to each other, the balls sit on the rope, as they come to rest. 

Hi!

If the ball is a SphereCollider + Rigidbody, just add a ObiCollider component to the ball. That's all there is to it, Obi will automatically calculate coupling between the rope and the rigidbody for them to interact and the sphere to rest on top of the rope (if restricted to 2D movement).

If the ball is a softbody, make sure particle collision constraints are globally enabled in the ObiSolver component, and make sure collision filters allow for the rope and the softbody to collide with each other. For details on collision filters, see: http://obi.virtualmethodstudio.com/manua...sions.html

kind regards,
Reply
#3
Hi thank you, 
So regarding the "sitting on a rope"... this is, at the end of the day, a 2D function. I mean there can be no Z movement.

So, I am a little confused. 

--- can I either use 2D physics with Obi or can I limit/turn off Z positioning?

---- just an idea... 
Could I set up a level in Unity 2D physics. This level is a room, with walls.
2D Circle Colliders and Rigidbodies flood the room and forces are applied. 

--- Could I then, in the background, match the 2D physics of that room but with Obi Colliders, 
Then, have an Obi SoftBody per 2D Circle. The Obi Softbdy would then match the position of its associated 2D Circle? 

 This would likely create the illusion that I would want. 



Or, as mentioned above, is there a 2D method to Obi itself? 
Thank You!
Reply
#4
(18-08-2022, 03:55 PM)Renman3000 Wrote: Hi thank you, 
So regarding the "sitting on a rope"... this is, at the end of the day, a 2D function. I mean there can be no Z movement.

So, I am a little confused. 

--- can I either use 2D physics with Obi or can I limit/turn off Z positioning?

---- just an idea... 
Could I set up a level in Unity 2D physics. This level is a room, with walls.
2D Circle Colliders and Rigidbodies flood the room and forces are applied. 

--- Could I then, in the background, match the 2D physics of that room but with Obi Colliders, 
Then, have an Obi SoftBody per 2D Circle. The Obi Softbdy would then match the position of its associated 2D Circle? 

 This would likely create the illusion that I would want. 



Or, as mentioned above, is there a 2D method to Obi itself? 
Thank You!

Hi!

There's no need to use complicated setups, just set the solver's mode to "2D". All physics calculations will happen using only X and Y coordinates. See:
http://obi.virtualmethodstudio.com/manua...olver.html

To make 2D colliders interact with Obi, use the ObiCollider2D component instead of the usual ObiCollider.

kind regards,
Reply
#5
Nice!!looking forward to it.
Reply
#6
(18-08-2022, 06:58 AM)josemendez Wrote: Hi!

If the ball is a SphereCollider + Rigidbody, just add a ObiCollider component to the ball. That's all there is to it, Obi will automatically calculate coupling between the rope and the rigidbody for them to interact and the sphere to rest on top of the rope (if restricted to 2D movement).

If the ball is a softbody, make sure particle collision constraints are globally enabled in the ObiSolver component, and make sure collision filters allow for the rope and the softbody to collide with each other. For details on collision filters, see: http://obi.virtualmethodstudio.com/manua...sions.html

kind regards,
...
Hi,
I just ran a quick test and the obi softbody sphere (under standard settings) and obi rope (also standard settings), Obi Solver in 2d Mode, sees the sphere hit the rope, bends the rope, but then passes through the rope. 

What general settings should I consider on either the softbody, rope or solver or other to have the softbody land on but not pass through the rope? 

Thank you
Reply
#7
(20-08-2022, 03:42 PM)Renman3000 Wrote: ...
Hi,
I just ran a quick test and the obi softbody sphere (under standard settings) and obi rope (also standard settings), Obi Solver in 2d Mode, sees the sphere hit the rope, bends the rope, but then passes through the rope. 

What general settings should I consider on either the softbody, rope or solver or other to have the softbody land on but not pass through the rope? 

Thank you

Just make sure the sphere is not a lot heavier than the rope (you can check mass values for the softbody in the blueprint editor, and for the rope in the path editor), and that particle sampling is dense enough for both that there are no large gaps in between particles (you can debug particles by adding a ObiParticleRenderer component to any actor, see: http://obi.virtualmethodstudio.com/manua...ering.html)

kind regards,
Reply
#8
(22-08-2022, 07:57 AM)josemendez Wrote: Just make sure the sphere is not a lot heavier than the rope (you can check mass values for the softbody in the blueprint editor, and for the rope in the path editor), and that particle sampling is dense enough for both that there are no large gaps in between particles (you can debug particles by adding a ObiParticleRenderer component to any actor, see: http://obi.virtualmethodstudio.com/manua...ering.html)

kind regards,


Hi,
Thank you.
I will be away from this project for a few days but just so I am clear what I need to do.... am I adding any colliders (sphere collider) and or rigidbody to to the main transform? Or am I good to rely strictly on your asset?


Thanks again!
Reply
#9
(22-08-2022, 04:08 PM)Renman3000 Wrote: I will be away from this project for a few days but just so I am clear what I need to do.... am I adding any colliders (sphere collider) and or rigidbody to to the main transform? Or am I good to rely strictly on your asset?

Hi!

Rigidbodies are intended to simulate the dynamics of rigid objects (as the name implies) and the purpose of colliders is to  define the shape of a rigid object.

Ropes are not rigid objects, since they're deformable. They do their own collision detection and their own dynamics (both particle-based, keep in mind Obi is a particle-based physics engine), so there's no use in adding either colliders or rigidbodies to them. The same applies to any other Obi actor (softbodies, cloth, fluids).

kind regards,
Reply
#10
(23-08-2022, 07:34 AM)josemendez Wrote: Hi!

Rigidbodies are intended to simulate the dynamics of rigid objects (as the name implies) and the purpose of colliders is to  define the shape of a rigid object.

Ropes are not rigid objects, since they're deformable. They do their own collision detection and their own dynamics (both particle-based, keep in mind Obi is a particle-based physics engine), so there's no use in adding either colliders or rigidbodies to them. The same applies to any other Obi actor (softbodies, cloth, fluids).

kind regards,
Thank you!
Reply