Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Teleport rope particles to wordspace positions in runtime
#3
(21-02-2020, 05:31 PM)zkkzkk32312 Wrote: Idealy I wish to Teleport a particle to a world space position then lock its position by dynamically creating a Attachment for it.
Can some one help?

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.
Reply


Messages In This Thread
RE: Teleport rope particles to wordspace positions in runtime - by josemendez - 22-02-2020, 09:41 PM