Hello, I was wonderingg if you can change the direction gravity each rope is experiencing?
A downloadable asset pack for Windows, macOS, and Android
The Rope Minikit is a code pacakge that brings stable rope physics to your Unity3d project. The rope component can be used to simulate simple hanging wires or more advanced setups with pulleys and weights that require active collision detection. The bundled example scene shows how to connect the rope for a physically simulated crane, a rope bridge and set of swings. The rope component is written with performance in mind and many compute intensive tasks are handled by Unity jobs on separate threads accelerated using the Burst compiler.
Readme & demos for other platforms can be downloaded below
- Stable rope physics
- Many tweakable user parameters
- Rigidbody connections allow interaction with the built-in physics engine
- Supports dynamic splitting
- Supports custom meshes (a chain with links, for example)
- Scene view handles for adjusting the spawn curve
- High performance is achieved using Unity jobs and the Burst compiler
- Typical performance for the example scene with collisions enabled:
- ~0.2 ms spent in job threads
- ~0.7 ms spent on the main thread
- Typical performance for the example scene with collisions disabled:
- ~0.15 ms spent in job threads
- ~0.35 ms spent on the main thread
- Full source code
- Example scene contains:
- Physically simulated crane
- Rope bridge
- Mouse interaction script
- Typical performance for the example scene with collisions enabled:
- Collisions work with convex Mesh, Box, Sphere and Capsule colliders only
- It is difficult to get perfectly stiff ropes unless very small physics time steps are used
- Rope bridge currently only takes the resting mass of colliding rigidbodies into account,there is no impact effect
- Scripting knowledge required for creating stable rope suspended platforms other than rope bridges
- Burst 1.1.2 or above
About the Minikits
Minikits are small, tweakable and extendable packages with full source code that illustrate how to implement interesting behaviours for your project. They're designed to be easy-to-use and self-explanatory.
In order to download this asset pack you must purchase it at or above the minimum price of $9.99 USD. You will get access to the following files:
- First small update (v1.01)Oct 16, 2019
Log in with itch.io to leave a comment.
Hi! The rope is subject to the gravity that is set up in the physics settings multiplied by the "Gravity Multiplier" property under "Simulation". So you can for example make a single rope stop being influenced by gravity by setting the multiplier to 0 for that rope, but you cannot make it fall in a different direction than the gravity of the scene (at the moment). Is this something you would like to have?
Thanks for responding! Yeah, it's a feature I'm looking for. Would implementing it be difficult? (also I understand that you have said before that you can make a rope more rigid by increasing the time steps. does this decrease performance by a large margin?)
No, it should be really straightforward. I can add it to the next version!
Regarding increasing the number of time steps, you can do this in two ways:
a) Decrease the Physics.fixedDeltaTime value: This can potentially have a large effect on the performance, depending on how complex the physics in your scene is in general. It will result in much better interactions between the rigid bodies and the ropes in the scene though!
b) Increase the number of sub-steps of a particular rope: This has very little performance impact as that part of the code is really fast. The downside is that it mostly affects the rope in question only.
:( i thought this was more affordable than getting obi rope; i was gonna just get it for a fun project i was doing and now its almost the same price. quite disappointing.
Hi, I also bought and implemented this kitt, it`s really cool rope, thank you. But now I need to cut it, and since I recently started learning unity, I still don`t know how to do it, can you help somehow?)
Thank you for the nice words! Cutting is not supported at the moment but I have it on my list of things to consider for the next update :)
Hi again.. cutting is now supported in the latest version! :)
Is it Obi Rope?
Hi, I bought and implemented the kit and it worked out great, thank you for creating this! One thing I'm running into trouble with is getting the end of the rope to firmly connect to a gameobject using the rope pin script. It gets close but it mostly just stays in the right area. Is there a way to firmly attach the last segment?
Hi and thank you for the kind words!
I've recently been told about this and I think it's a bug. I'm about to investigate it and hopefully fix it as the next item on my todo-list. When I do you'll see it mentioned in the release-notes of a new version.
Hi again, I've uploaded version 1.03 just now and it should fix the issue you're having!
Hi, I've bought the kit, and played around a little bit and I just have a few questions.
1. How do you decide on how many spawn points to add ( what do they do ? )
2. I have switched on collision, but it doesn't appear to be working. The rope falls through the ground etc.
3. My rope needs to be rolled like in your crane example, but it needs to be rolled up from the start. How would I go about doing that ?
Best regards Jeppe
1. The spawn points let you decide the initial shape of the rope, so the number of them that you use is totally up to you (it doesn't influence the performance in any way, the resolution and total length of the rope does however).
2. Is your ground a non-convex mesh collider perhaps? See this under "Current Limitations" above:
Collisions work with convex Mesh, Box, Sphere and Capsule colliders only
3. That's exactly a use case for multiple spawn points. If you need more fine-grained control of the shape, I suggest that you spawn the rope and then set each particle position using a custom script (for that you can see what functions to use in the README).
Hope this helps! I'll be away on vacation for 2 weeks starting tomorrow so if you have further questions please send an email through my website and I'll get back to you when I come back.
Does this have self-collisions? Or do the ropes not interact with each other / itself
Not in its current state. I have been thinking about adding this but there are no concrete plans. What would you like to use it for?
The ropes in your demo seem like rubber bands. Do you have a demo with less stretchy ropes please?
The ropes seem stretchy because the mouse interaction script is infinitely strong and forces the rope to be pulled along no matter its strength. You can take a look at the ropes that are free to swing without the mouse pulling them (the crane for example) for a more realistic scenario. Use the up and down arrow on the keyboard to rotate the drum of the crane. (I should maybe update the demo and make the mouse less strong as quite a few people comment on this)
That said, it's difficult to get perfectly stiff ropes while keeping the simulation stable, there will always be a small amount of stretch. To increase stiffness, one can a) lower the physics time step b) increase the solver iteration count and/or c) lower the resolution of the rope.
Any chance this would work on Android/Oculus Quest?
Actually, the demo scene runs at a solid 60 fps on my old Fairphone 2 (Snapdragon 801), so it should definitely work with the Quest! At least as long as the scenes are not overly complex.
I just had to make sure that I had the Android SDK & NDK Tools installed via Unity Hub and everything worked out-of-the-box :)
UPDATE: I've uploaded an .apk file that you can test on your target phone!