Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Break Pin Constraint Event
#2
(07-01-2020, 01:48 AM)Visitor245262 Wrote: Is there a way to detect when and which pin constraint is broken when the "Break Resistance" property is set?

Not by default, but it's pretty easy to add a callback fro this.

In ObiParticleAttachment.cs, line 371, the BreakConstraints() function is called for each pin constraint batch. This function iterates over all constraints in the batch, checking which ones should break, and breaking them. Slighty modify this function so that it calls a C# event or a Unity event you can subscribe to, for each constraint it breaks.

Let me know if you need help with this.
Reply


Messages In This Thread
Break Pin Constraint Event - by Visitor245262 - 07-01-2020, 01:48 AM
RE: Break Pin Constraint Event - by josemendez - 07-01-2020, 08:00 AM
RE: Break Pin Constraint Event - by Visitor245262 - 25-04-2020, 04:32 AM