Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Rope Wave Effect
#4
(27-09-2022, 04:35 PM)kureysalp Wrote: But your answer is a continuous flow. Not a single flow from single tap.

Well of course, this is just an example on how to control rope thickness by setting the radius of individual particles. Anything that’s specific to your use case is completely up to you to implement as it’s plain C#, not related to Obi or its API.

If you want a single flow, clamping the sinewave is trivial to do.

If you want something more complex like keeping track of multiple individual “flows” along the rope, you can store these in a list of floats, each float tracking how far along the rope a “flow” is. When you want to create a “flow” (for instance when the user taps the screen) add a new entry to the list. Every frame, add a fixed amount to each value in the list to advance the “flows” down the rope. When a value gets outside the rope, remove it from the list.

Kind regards,
Reply


Messages In This Thread
Obi Rope Wave Effect - by NorkQ - 11-08-2022, 05:48 PM
RE: Obi Rope Wave Effect - by josemendez - 12-08-2022, 07:16 AM
RE: Obi Rope Wave Effect - by kureysalp - 27-09-2022, 04:35 PM
RE: Obi Rope Wave Effect - by josemendez - 27-09-2022, 06:34 PM