Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Finding last point of rope
#18
(16-11-2021, 11:18 AM)srid96 Wrote: Is the code for last point correct?
actor.solverIndices[actor.solverIndices.Length - 1]

It is correct, as long as you don't have any pooled particles.

Ropes create a pool of auxiliary particles in case you want to resize or cut the rope. (see:http://obi.virtualmethodstudio.com/manual/6.2/ropesetup.html) Check that in your blueprint, the pool size is zero. If it isn't, the last particle in the solverIndices array will be one in the pool, not one in the rope.

For a non-zero pool size (that is, a resizable/cuttable rope), you must use elements as mentioned previously in this thread. Elements are the "edges" in between particles, they join 2 particles each. The last particle in the rope will then be the second particle of the last element:

Code:
var lastPos = solver.renderablePositions[rope.elements[rope.elements.Count-1].particle2];
Reply


Messages In This Thread
Finding last point of rope - by srid96 - 15-11-2021, 07:36 AM
RE: Finding last point of rope - by josemendez - 15-11-2021, 08:40 AM
RE: Finding last point of rope - by srid96 - 15-11-2021, 09:08 AM
RE: Finding last point of rope - by josemendez - 15-11-2021, 09:21 AM
RE: Finding last point of rope - by srid96 - 15-11-2021, 03:35 PM
RE: Finding last point of rope - by josemendez - 15-11-2021, 03:39 PM
RE: Finding last point of rope - by srid96 - 15-11-2021, 03:42 PM
RE: Finding last point of rope - by josemendez - 15-11-2021, 03:47 PM
RE: Finding last point of rope - by srid96 - 16-11-2021, 08:30 AM
RE: Finding last point of rope - by josemendez - 16-11-2021, 08:39 AM
RE: Finding last point of rope - by srid96 - 16-11-2021, 09:10 AM
RE: Finding last point of rope - by josemendez - 16-11-2021, 09:48 AM
RE: Finding last point of rope - by srid96 - 16-11-2021, 10:39 AM
RE: Finding last point of rope - by josemendez - 16-11-2021, 10:49 AM
RE: Finding last point of rope - by srid96 - 16-11-2021, 10:57 AM
RE: Finding last point of rope - by josemendez - 16-11-2021, 10:59 AM
RE: Finding last point of rope - by srid96 - 16-11-2021, 11:18 AM
RE: Finding last point of rope - by josemendez - 16-11-2021, 11:22 AM
RE: Finding last point of rope - by srid96 - 16-11-2021, 11:42 AM
RE: Finding last point of rope - by josemendez - 16-11-2021, 11:44 AM
RE: Finding last point of rope - by srid96 - 18-11-2021, 02:39 PM
RE: Finding last point of rope - by josemendez - 18-11-2021, 02:48 PM
RE: Finding last point of rope - by srid96 - 18-11-2021, 04:07 PM
RE: Finding last point of rope - by josemendez - 19-11-2021, 09:06 AM
RE: Finding last point of rope - by srid96 - 19-11-2021, 10:14 AM
RE: Finding last point of rope - by josemendez - 19-11-2021, 10:22 AM
RE: Finding last point of rope - by srid96 - 19-11-2021, 11:29 AM
RE: Finding last point of rope - by josemendez - 19-11-2021, 11:43 AM
RE: Finding last point of rope - by srid96 - 19-11-2021, 11:54 AM
RE: Finding last point of rope - by josemendez - 19-11-2021, 12:24 PM
RE: Finding last point of rope - by srid96 - 19-11-2021, 01:39 PM
RE: Finding last point of rope - by josemendez - 19-11-2021, 02:22 PM
RE: Finding last point of rope - by srid96 - 19-11-2021, 06:45 PM