Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best way to make a whip
#1
Hi everyone, I'm new here and only just started with Obi Rope.

I saw online that a few people managed to create a whip with Obi Rope but I couldn't find enough specific information on how they achieved it. I had a go at it myself with just a rope with 4 control points. I connected the first two control points to each other and gave each a mass of 10. The third control point has a mass of 5 and the final (at the tip) has a mass of 0.1

It sort of works but then I created a melee weapon with GameKitController and now it works a bit less Sonrisa Especially when picking up the weapon, the tip just flings around crazy. So I wanted to check if anyone can give me advice on how to best create a whip. Do you think it's best to use a rope or a rod? Or both? I feel like what would be good is if I could use a rope and progressively reduce the stiffness from one control point to the next, but I didn't see an option for that, which is why I tried the mass instead.

My whip doesn't need to do anything other than "whipping" through the air, meaning, it doesn't need to collide with anything or wrap around stuff. It's just a visual object that's all. The damage to the enemy is applied simply by triggering the melee attack itself, so it doesn't even matter if the whip actually hits an object or not.

Here's a video of my slightly failed attempt number one Sonrisa Thanks everyone

Reply
#2
(08-06-2022, 05:49 PM)wohoyefe Wrote: I saw online that a few people managed to create a whip with Obi Rope but I couldn't find enough specific information on how they achieved it. I had a go at it myself with just a rope with 4 control points. I connected the first two control points to each other and gave each a mass of 10. The third control point has a mass of 5 and the final (at the tip) has a mass of 0.1

Hi there!

Mass is expressed in Kg, just like in Unity. Your settings mean that each particle near the handle will weight 10 kg, smoothly transitioning to 5 near the middle, and to 100 grams towards the tip. This may result in your whip weighting +100 kg, depending on your blueprint resolution (that is, amount of particles per length unit)!

I'd use 0.5 kg for the first couple control points, 0.2 for the mid one, and 0.05 for the tip.


(08-06-2022, 05:49 PM)wohoyefe Wrote: It sort of works but then I created a melee weapon with GameKitController and now it works a bit less Sonrisa Especially when picking up the weapon, the tip just flings around crazy. 

In your video, it just seems like the tip is stuck above the ceiling. How are you "picking up" the whip?

(08-06-2022, 05:49 PM)wohoyefe Wrote: So I wanted to check if anyone can give me advice on how to best create a whip. Do you think it's best to use a rope or a rod? Or both?

Ropes and rods are fundamentally different. The main difference is that rods have a "rest pose" other than being completely straight, and ropes always strive to be straight. In your case, a rope is enough.

(08-06-2022, 05:49 PM)wohoyefe Wrote: I feel like what would be good is if I could use a rope and progressively reduce the stiffness from one control point to the next, [/b]but I didn't see an option for that, which is why I tried the mass instead.

No need to have varying stiffness. Whips work because the tip has less mass than the handle, so forces applied on the handle get amplified as they move towards the tip.

This may result in the tip moving at very fast speeds, which is a recipe for tunneling though. You will need to increase the temporal resolution of your simulation, this is done by using more substeps (8-12 should be enough in your case). The manual contains an in-depth explanation of what substeps/iterations are and how they affect the simulation: http://obi.virtualmethodstudio.com/manua...gence.html

let me know if you need further help, cheers!
Reply
#3
Cool, thanks, so I was on the right track Sonrisa 
I'll mke the changes you suggested and will get back to you with the results. Thanks so much for your help!
Reply