Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial?
#10
(18-09-2020, 09:12 PM)Havie Wrote: Ahh thank you for clearing that up.

This makes a lot more sense.

Next I need to get my ball and trash can to collide.

So reading the section about collisions here : 
http://obi.virtualmethodstudio.com/tutor...sions.html

I've gone ahead and added a box collider to my trash can , a sphere collider to my ball, and an Obi Collider to both.

However, when the scene starts my ball starts flying up and into the sky, and the trash can falls over despite being on the ground.

https://youtu.be/5_4LOnsog_g

any idea whats causing this?

Again, mixing colliders and softbodies in the same object makes no sense. Collider components are used in Unity to define the shape of rigidbodies, so there’s no use adding them to a softbody. A softbody does not need any collider component to interact with other objects, as it is represented by a bunch of particles, and particles already can collide between them.

You really  need to establish a clear cut between rigidbodies and softbodies in your mind. Haphazardly mixing their components together will always  result in weird behavior. In your video, you’ve added a collider to the sphere softbody. So the sphere is colliding with itself, trying to get away from its current position in any way possible, that’s why it floats: the poor thing is literally running from itself Guiño.

-Rigidbody: shape defined by collider component(s), dynamics driven by rigidbody component. You can think of colliders/rigidbodies as two sides of the same coin: collider components define shape, rigidbody components apply dynamics (motion). See the Unity manual for more info.

-Softbody: shape and dynamics are both defined by particles. Particles act as “atoms” in a sense. No need to add rigidbodies or colliders, as these are reserved for rigidbody interaction/dynamics.

For a softbody to collide with a rigidbody, the rigidbody colliders need to have a ObiCollider component so that the softbody “sees them”. ObiCollider and ObiRigidbody are just wrappers, that allow Unity’s rigidbody engine to interact with Obi’s particle engine.

For a softbody to collide with another softbody (this is called intercollision) their particles just need to have different phase values. This is explained in the manual. No need for colliders or rigidbodies to be involved.

Note most of this information is applicable to all game/physics engines. Rigid and softbodies are simulated in different ways, and while there are mechanisms to make them interact with each other (in this case, ObiCollider and ObiRigidbody, that allow Obi particles to collide with and apply forces to rigidbodies) mixing rigidbody and softbody bits in the same object serves no practical purpose.
Reply


Messages In This Thread
Tutorial? - by Havie - 13-09-2020, 10:24 PM
RE: Tutorial? - by josemendez - 14-09-2020, 08:06 AM
RE: Tutorial? - by Havie - 16-09-2020, 09:00 PM
RE: Tutorial? - by josemendez - 16-09-2020, 10:18 PM
RE: Tutorial? - by Havie - 17-09-2020, 08:10 PM
RE: Tutorial? - by josemendez - 18-09-2020, 07:01 AM
RE: Tutorial? - by Havie - 18-09-2020, 12:14 AM
RE: Tutorial? - by josemendez - 18-09-2020, 07:10 AM
RE: Tutorial? - by Havie - 18-09-2020, 09:12 PM
RE: Tutorial? - by josemendez - 18-09-2020, 09:44 PM
RE: Tutorial? - by Havie - 19-09-2020, 04:24 PM
RE: Tutorial? - by josemendez - 19-09-2020, 05:32 PM
RE: Tutorial? - by Havie - 19-09-2020, 10:41 PM
RE: Tutorial? - by josemendez - 20-09-2020, 12:57 AM
RE: Tutorial? - by Havie - 20-09-2020, 01:21 PM
RE: Tutorial? - by Havie - 20-09-2020, 04:18 PM
RE: Tutorial? - by josemendez - 20-09-2020, 07:20 PM
RE: Tutorial? - by Havie - 21-09-2020, 07:02 PM
RE: Tutorial? - by josemendez - 21-09-2020, 08:03 PM
RE: Tutorial? - by josemendez - 22-09-2020, 02:21 PM