Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Resetting Rope causing Error
#5
(07-08-2024, 08:47 AM)vrtraining Wrote: Thanks, it seems to be working fine for now. Like I reset particles and then I change length back to initial in very next line. I get the rope back at initial position with same length. You are saying it won't work, it means there could be some issue with it?

The key thing to keep in mind is that the amount of particles in the blueprint and the amount of particles in the current rope may be different, if you're resizing the rope before calling ResetParticles().

Say you have 10 particles in the blueprint. You instantiate a rope using this blueprint, then increase its length so that it has 15 particles. After that you call ResetParticles(): this will set the position/orientation/velocity of the first 10 particles to match the blueprint, but will leave the extra 5 particles alone. It won't reset the length of the rope to what it previously was - won't destroy/add particles, constraints or elements.

As long as your logic takes this into account it will be fine.

kind regards,
Reply


Messages In This Thread
Resetting Rope causing Error - by vrtraining - 06-08-2024, 06:33 PM
RE: Resetting Rope causing Error - by vrtraining - 07-08-2024, 07:13 AM
RE: Resetting Rope causing Error - by josemendez - 07-08-2024, 08:06 AM
RE: Resetting Rope causing Error - by vrtraining - 07-08-2024, 08:47 AM
RE: Resetting Rope causing Error - by josemendez - 07-08-2024, 09:38 AM
RE: Resetting Rope causing Error - by vrtraining - 07-08-2024, 09:40 AM
RE: Resetting Rope causing Error - by josemendez - 07-08-2024, 10:20 AM
RE: Resetting Rope causing Error - by vrtraining - 07-08-2024, 10:45 AM
RE: Resetting Rope causing Error - by josemendez - 07-08-2024, 11:53 AM
RE: Resetting Rope causing Error - by josemendez - 07-08-2024, 12:15 PM
RE: Resetting Rope causing Error - by vrtraining - 07-08-2024, 12:50 PM