Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  ObiRope Points
#20
(20-10-2021, 09:23 AM)Matbee Wrote: can i somehow limit the length of the rope?

Don't really understand this question... ropes already have a limited length, their rest length. They won't exceed this length (that is, unless you attach their ends to transforms using static attachments, in that case you would be forcing them to stretch).

(20-10-2021, 09:23 AM)Matbee Wrote: since other objects are associated with this actor, and it is necessary that the order is observed in order to animate the desired objects after working with a certain rope

Still don't understand....why not using the order in which they appear in the hierarchy? the "solver.actors" array in the solver contains *exactly* the same data as Unity's transform hierarchy, but in a random order as it's basically a set: order does not matter. Unity will give them to you ordered, which is what you need right? why access them trough the actors array? Huh

As I mentioned before, transform.GetChild() will give them to you in the order they appear in the scene hierarchy. So if you only have ropes inside the solver, you can access them ordered like this:

Code:
var rope1 = solver.transform.GetChild(0).GetComponent<ObiRope>(); // first rope
var rope2 = solver.transform.GetChild(1).GetComponent<ObiRope>(); // second rope
var rope3 = solver.transform.GetChild(2).GetComponent<ObiRope>(); // third rope

If you have other objects mixed in, simply check whether or not they have a rope component.
Reply


Messages In This Thread
ObiRope Points - by Matbee - 19-10-2021, 10:26 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 10:50 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:24 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 11:27 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:00 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 11:24 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:28 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 11:29 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:47 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 12:02 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 01:26 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 01:30 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 02:36 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 02:50 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 02:52 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 03:02 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 04:23 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 04:36 PM
RE: ObiRope Points - by Matbee - 20-10-2021, 09:23 AM
RE: ObiRope Points - by josemendez - 20-10-2021, 09:53 AM
RE: ObiRope Points - by Matbee - 20-10-2021, 02:12 PM
RE: ObiRope Points - by josemendez - 20-10-2021, 02:30 PM
RE: ObiRope Points - by Matbee - 20-10-2021, 04:06 PM
RE: ObiRope Points - by josemendez - 20-10-2021, 05:41 PM
RE: ObiRope Points - by Matbee - 21-10-2021, 10:14 PM
RE: ObiRope Points - by josemendez - 21-10-2021, 10:26 PM
RE: ObiRope Points - by Matbee - 21-10-2021, 10:42 PM
RE: ObiRope Points - by josemendez - 22-10-2021, 07:18 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 07:56 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:04 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 08:20 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:30 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 08:41 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:46 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 12:40 PM
RE: ObiRope Points - by josemendez - 25-10-2021, 08:44 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:46 AM