13-03-2019, 09:54 AM
Can I add vector and script to obi tearable cloth when it hit somthing collider(box, sphere or mesh)?
Help Add vector and script when hit collider.
|
13-03-2019, 09:54 AM
Can I add vector and script to obi tearable cloth when it hit somthing collider(box, sphere or mesh)?
13-03-2019, 09:04 PM
(13-03-2019, 09:54 AM)Richard Wrote: Can I add vector and script to obi tearable cloth when it hit somthing collider(box, sphere or mesh)? Yes, use collision callbacks: http://obi.virtualmethodstudio.com/tutor...sions.html
14-03-2019, 11:29 AM
The page is written about setting of obi cloth, but do I not have to set up collider the cloth would collide with? Just add obi collider?
14-03-2019, 12:52 PM
(This post was last modified: 14-03-2019, 12:54 PM by josemendez.)
(14-03-2019, 11:29 AM)Richard Wrote: The page is written about setting of obi cloth, but do I not have to set up collider the cloth would collide with? Just add obi collider? Not sure I understand your question. Adding a ObiCollider component to any existing collider allows it to interact with Obi actors. That's it, you don't need any additional set up. See: http://obi.virtualmethodstudio.com/tutor...sions.html Then, if you need to detect which solver particles have collided with a collider, you subscribe to the solver's OnCollision event (as described i the link I provided).
14-03-2019, 04:10 PM
(14-03-2019, 12:52 PM)josemendez Wrote: Not sure I understand your question. Adding a ObiCollider component to any existing collider allows it to interact with Obi actors. That's it, you don't need any additional set up. See: http://obi.virtualmethodstudio.com/tutor...sions.html I could do that. Can I attach script or component without colliding? For example, particles that are in (or enter) the box(or in the area) gain script or component.
14-03-2019, 05:49 PM
(14-03-2019, 04:10 PM)Richard Wrote: I could do that. Hi, I think you want to use a trigger (built-in Unity stuff). Simply enable the "IsTrigger" checkbox of your collider. It will detect particles entering it, but won't generate collisions. See: https://docs.unity3d.com/Manual/CollidersOverview.html
15-03-2019, 11:48 AM
(14-03-2019, 05:49 PM)josemendez Wrote: Hi, Hello. How can I fix: NullReferenceException: Object reference not set to an instance of an object Obi.ObiCloth.AddToSolver (System.Object info) (at Assets/Obi/Scripts/Actors/ObiCloth.cs:167) Obi.ObiActor.Start () (at Assets/Obi/Scripts/Actors/ObiActor.cs:163) ?
15-03-2019, 04:42 PM
(15-03-2019, 11:48 AM)Richard Wrote: Hello. Hi, This should only happen if you set the solver to null programmatically, then call AddToSolver(). Can you describe what you're doing? (15-03-2019, 04:42 PM)josemendez Wrote: Hi,I am trying to put pants on human. I would like to fasten pants like rubber of clothing. However, it is hard to pick up particle on script. I use trigger. |
« Next Oldest | Next Newest »
|