Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision Between 2 SoftBody
#3
(04-11-2021, 10:34 AM)josemendez Wrote: Hi,

Subscribe to OnParticleCollision instead of OnCollision. See the manual:
http://obi.virtualmethodstudio.com/manua...sions.html
Fast reply, thanks

(04-11-2021, 10:34 AM)josemendez Wrote: Hi,

Subscribe to OnParticleCollision instead of OnCollision. See the manual:
http://obi.virtualmethodstudio.com/manua...sions.html
Can you show me a sample about it, I change OnCollision to OnParticleCollision but it appears some error at line
Code:
var col = world.colliderHandles[contact.bodyB].owner;
Error is:
Quote:ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <9577ac7a62ef43179789031239ba8798>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <9577ac7a62ef43179789031239ba8798>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <9577ac7a62ef43179789031239ba8798>:0)
BallObiCtr.HandleCollisionCallback (Obi.ObiSolver solver, Obi.ObiSolver+ObiCollisionEventArgs e) (at Assets/BallObiCtr.cs:29)
Obi.ObiSolver.EndStep (System.Single substepTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1582)
Obi.ObiUpdater.EndStep (System.Single substepDeltaTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:92)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:52)
Reply


Messages In This Thread
Collision Between 2 SoftBody - by dinhtai1104 - 04-11-2021, 10:24 AM
RE: Collision Between 2 SoftBody - by josemendez - 04-11-2021, 10:34 AM
RE: Collision Between 2 SoftBody - by dinhtai1104 - 04-11-2021, 10:35 AM