Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  create Obi handle on script at runtime
#6
(24-05-2019, 09:03 AM)Richard Wrote: Sorry for my English, I mean I want to choose particle like when we choose particle on "Edit particle" of obi cloth or obi tearable cloth. and create obi handles. When I choose the particle, I want to choose particle like by those(Mathf.Min/Max) on script "ObiClothParticleHandles".

Sorry but I still cannot figure out what you want.

"Edit particle" allows you to choose particles using a editor tool. You cannot use this at runtime.

Code:
float left = Mathf.Min(startPos.x,currentPos.x);
float right = Mathf.Max(startPos.x,currentPos.x);
float bottom = Mathf.Min(startPos.y,currentPos.y);
float top = Mathf.Max(startPos.y,currentPos.y);

This code is used in a editor handle script, not to be confused with runtime particle handles. They're not the same. This is part of a UI tool, used to determine which particles will be selected/unselected when the user is dragging a selection box. It does not have anything to do with the particle simulation.

I think you want to create a runtime selection marquee tool, is that it?


Messages In This Thread
RE: create Obi handle on script at runtime - by josemendez - 24-05-2019, 09:40 AM