Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Closed loop rope, move particles to stretch it
#4
(Today, 10:26 AM)alicecatalano Wrote: The particle is active in Start

I was not referring to the particle being active/inactive, but whether the actor has already been loaded by the solver or not.

(Today, 10:26 AM)alicecatalano Wrote: I found this problem with the teleport function in various occasion.

All the teleport function does is set solver.positions[particleIndex] to the value you pass to it, and solver.velocities[particleIndex] to zero. As long as the solver contains valid information at the time of calling the function it should work.

You can try calling solver.positions[82] = new Vector3(1,3,5); instead. It will result in an IndexOutOfBounds exception in case the solver does not yet contain particle #82.

Note that calling elastic.blueprint.positions[82] (as in your script's commented out line) won't do anything at runtime, as it's modifying blueprint data.

kind regards
Reply


Messages In This Thread
RE: Closed loop rope, move particles to stretch it - by josemendez - Today, 10:39 AM