- Home /
Rope Physics - PhysX - Box2X - Chipmunk
Is this possible within Unity (see link to video below)? If so, can I do it with Unity's built-in PhysX engine, or must I use something like the Box2D plugin from the asset store, or something else entirely? Can someone please point me in the right direction and maybe give some insight on how to get started. Thank you!
I tried to open the video, but it wont play, could you please verify the video it's ok? thanks.
The video works fine on my end. Its a $$anonymous$$OV file which plays natively on $$anonymous$$ac which is what I'm viewing it on. Its basically a video of Crayon physics. I'm mostly interested in the dynamic drawing of lines that then render into ropes. I'll try and find another example on Youtube to post.
Here is another good example. Again, I'm interested in the rope mechanics. and being able to connect the rope to other objects, and having objectss connect and swing, or like in this video, ride along on top, etc. http://www.youtube.com/watch?v=cjQ$$anonymous$$acL6$$anonymous$$dU
Answer by whydoidoit · Aug 05, 2012 at 07:21 PM
Physx is fine for doing rope etc so should have no problem with building something like your video. See this link about creating rope with configurable joints. I would imagine the trick is in creating a set of "almost" accruate primitive colliders - that or a convex mesh collider and then suitably limit into 2D. I've found Physx to be pretty fast.
Yes, $$anonymous$$ike is right! You could use configurable joints to achieve that!
Answer by sgttravers · Aug 06, 2012 at 04:53 PM
Thanks for the input guys. I'll have to try configurable joints again. I did indeed try them in the past, but my results were bleak. It seems that the physics of the joints were very unstable when the rope was interacted with i.e. pulled on by a character controller. See, the scenario I would like to achieve is a rope attached to a static object at one end, and at the other the rope is attached to a character controller. The character controller is then able to move about a scene filled with other static objects. In some cases the character controller must pull on the rope to stretch it tight, then gather it up and scale up the rope to higher platforms. See the picture to get a better idea. When I've tried this in the past, the rope would just spaz out and segments would fly all over the scene, or it would pass through static objects because the joints were stretched so far that gaps where left between colliders. Any further ideas on how to deal with these problems?
You certainly want more advanced rope that I've ever built - I don't know how good that box2D port is - but given that Unity runs PhysX in software then the performance shouldn't be too awful in comparison. I haven;t used Box2D in Unity - but it was always pretty good on the other platforms.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Question on Negating Physics Drag 1 Answer
Are unity's and Physx's frame rates in sync? 1 Answer
Creating an octopus / squid that spits ink with a particle system? 1 Answer
How does unity add torque 1 Answer