Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Instantiate new rope on tear
#3
(06-09-2017, 08:30 PM)josemendez Wrote: Hi Nizmo!  Sonrisa

Why do you need each rope piece to be its own GameObject? remember that the GameObject transform is not affected by the movement of rope particles in any way, so the only benefit you'd get from it is...well, another GameObject.

ObiRopeCursors can make individual rope segments (created by cutting a rope) grow or shrink when positioned at the appropriate place in the rope, so having separate GameObjects for this purpose isn't necessary.

Also having a GameObject per rope piece could spawn lots of them in the worst case (exactly as many GameObjects as particles your original rope had, minus one), hindering performance. Honestly I cannot think of a single advantage or potential use case for this method, that's why I'm curious as to why you need it.



My rope are going to actually be wires. Once I cut one I can attach the ends to terminals to conduct electricity. Each wire can have different voltage, amps and what not so I have a component that takes care of what each wire is connect to and how much potential it has. If I cut a rope and it’s on the same gameobject it will be a lot harder to see what electrical potential that wire has. I’d have to keep track of the start and end particles of the torn rope to be able to do what I want. That’s a lot harder than just making a new gameobject that get its own components.

Also I have a highlight script that make the rope a color when touched in VR. Now if I cut a rope and touch a part of it, all the torn parts highlight which is not ideal.
Reply


Messages In This Thread
Instantiate new rope on tear - by niZmo - 06-09-2017, 02:55 PM
RE: Instantiate new rope on tear - by josemendez - 06-09-2017, 08:30 PM
RE: Instantiate new rope on tear - by niZmo - 06-09-2017, 10:42 PM
RE: Instantiate new rope on tear - by josemendez - 07-09-2017, 10:54 AM
RE: Instantiate new rope on tear - by niZmo - 07-09-2017, 02:14 PM