Best way to make a Whip?

Hello, I have been trying to make a physical whip, I tried using dynamic bone and Unity Cloth for this but it wont work that way.

Anybody has implemented this that can give me some advice?

Thank you.

Use a rope, that’ll probably help

The best idea to make a whip is not to use physics. You animate the whip (with bones and blendshapes), and then use prebaked animation. Trying to use physics is asking for trouble, because it’ll wrap around everyhting and get stuck often - plus the whip is incredibly hard to control.

If you’re trying to make some sort of motion controller experience with a whip, then try using joint chains. Unity cloth won’t interact with the world. Rigidbody joined together with joints will.

7 Likes

For some weekend fun?

4 Likes

I would need to make it physics based as it is going to be used with VR

If you really, really, really, REALLY want a physical whip, try linked rigidbodies. You’ll need plenty of luck with it, because a whip is very hard to control.

A simpler option would be to recognize “whipping” gesture and play predefined animation anyway.

3 Likes

What does the whip need to be able to do?

Is it wrapping around other rigidbodies and pulling them?

This is the approach I would use. I’ve done lots of stuff with this approach. It works, but it needs a lot of tuning to get right.

If you go with this approach, I would suggest separating the rendering somewhat from the physics. In 2D drawing a mesh that follows the rigid body chain works well. In 3D you can make the rigid bodies bones of a skinned mesh.

2 Likes

Hello, thanks everybody for your help. Following a few of your recommendations I managed to get a whip working.

  • Im using ubi rope to drive the rope mechanic
  • I also attached a rigid body to the tip of the whip, this makes the tip have some weight so it can create some momentum for the whip to follow that momentum.
  • Then I have a script in the tip that will know when the tip is moving faster enough to make sounds and check collisions.

This is the final result:

3 Likes

I was just going to suggest Obi then I saw that you used it (Ubi = Obi I guess?) :smile: Great tool. We use it for coppar wire simulation, not perfefct since copper wires are close to zero plastic and rope sims generally cant simulate that. But we are happy with the result

Here is a guy that has doen a complete custom physics solution for his whip

2 Likes

how can i do this wipe like rope ??