Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How do I set a particle position at runtime ?
#2
Quote:Is there a way to set the first particle of my rope to a specific position, but still have all the other particles on the rope follow the simulation ?
Particles are completely independent from each other. Setting the position of one particle won't automatically move other particles, nor make the rest of the rope "follow" it. If you want the entire rope to move to a different place, you need to iterate over all of its particles, and set their position.

Quote:If so, where should the code go ? I am not sure the Update method is the way to go.
Never use Update for physics (at least, not unless you know exactly what you are doing and why). All physics-related code should go in FixedUpdate.

Quote:Also, I really would like to avoid having to instantiate 40+ blueprints. Is this something I really have to do ?
Do you mean 40 different blueprints? If you need 40 completely different ropes, then yes, you need a blueprint for each one. The advantage of blueprints is that they can be shared by multiple ropes, saving a lot of memory.
Reply


Messages In This Thread
RE: How do I set a particle position at runtime ? - by josemendez - 29-03-2020, 06:13 PM