Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Teleport rope particles to wordspace positions in runtime
#4
(22-02-2020, 09:41 PM)josemendez Wrote: Hi there,

You can set any particle's position, velocity, mass, or any other property. See:
http://obi.virtualmethodstudio.com/tutor...icles.html

So, moving a particle somewhere is just a matter of setting its position, and (optionally) zeroing out its velocity. All particle properties must be expressed in solver space, you can use Unity's InverseTransformPoint method to transform from world space to solver space (that is, the solver's local space). Let me know if you need help with the code to achieve this.

To attach the particle at runtime, make a ObiParticleGroup containing your particle (remember that particle groups are ScriptableObjects, so you must use ScriptableObject.CreateInstance to create them) and assign it to the attachment's particleGroup.

Sir, I am not a professional code designer.  Can you teach me how to use ScriptableObject.CreateInstance  in each particle 's local space to create ObiParticleGroup?
Reply


Messages In This Thread
RE: Teleport rope particles to wordspace positions in runtime - by ab8228657 - 02-03-2020, 03:23 AM