Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make the Start/End Prefab able to be Raycasted?
#17
Just one thing to add to what niZmo said: ObiRope already has a method to get the "real" length, including stretch:


Code:
float length = rope.CalculateLength();
No need to roll your own.

Also, niZmo's one would not work in case of a torn or extended/shortened rope, since particle ordering can change. The built-in method however, iterates over distance constraints instead of particles, so it will return the correct length in all cases.
Reply


Messages In This Thread
RE: How to make the Start/End Prefab able to be Raycasted? - by josemendez - 04-11-2017, 08:03 PM