Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Question about fishing rod mechanic
#6
(12-07-2023, 04:10 PM)erenjeagerot Wrote: I did not use code. I changed the stretching scale value from the editor.

Then of course the rope will spring/wiggle as you change the value! Sonrisa. For instance if the stretching scale is set to 1 and you suddenly change it to 1.2, the rope instantly stretches by 20% which will make it wiggle around. This cannot be avoided unless you change the scale *very* slowly to give the rope time to absorb the momentum (assuming you're changing the scale over time using code) which is what I initially suggested:

Quote:Just reduce the stretching scale slowly over time, that should compress the rope slowly as well.

Stretching scale makes the rope stretch and compress, without actually changing its physical representation. No more rope is added or removed, the existing one is just stretched or compressed like a spring. This means no new particles will be created along the rope, they will simply be spaced apart - if the scale is larger than 1- or brought together - if the scale is smaller than zero. If you add a ObiParticleRenderer to the rope to visualize its particles, you'll clearly see what I mean. This is in no way no equivalent to reeling more rope in/out, which is what a fishing rod does, it's closer to having an elastic rubber band and stretching it.

While setting the stretching scale can be useful in some situations, if you want to actually change the length of the rope you should use a cursor. All included sample scenes that change the length of a rope at runtime (Crane, GrapplingHook, FreightLift just to name some) do it this way.

Let me know if you need further help. Cheers!
Reply


Messages In This Thread
RE: Question about fishing rod mechanic - by josemendez - 12-07-2023, 04:56 PM