Model for bullet 3D rope

Anything about development not directly related to libgdx, e.g. OpenGL, Android APIs etc.

Model for bullet 3D rope

Postby weldeini » Thu Nov 07, 2019 2:01 pm

Hi,

I need an advise. I have successfully implemented a rope (soft body) connecting two rigid bodies, using btSoftBodyHelpers.CreateRope method (Bullet Physics). The only problem is the rope is - obviously - not visible, and I need to build a model for a it, which I can render.

Bullet rope is just a set of connected vertices (a line without any volume), hence I need to build some mesh-shape around it. The best approach I am thinking about is to have a separate Box (libgdx ModelInstance) for each segment of the rope. I would calculate position and rotation of a single rope segment and apply same transformation to my box. MyWegMansConnect In short: if my rope is build from 5 vertices, it means it has 4 segments, so I would need to have 4 separate ModelInstances (Box), each visualizing one segment of the rope. I am totally ok with a low-poly approach, I just need to do something so the rope is visible.

I could probably use skinning but that's something I want to avoid - I don't need skinning in my entire project, so why to get into details with shaders etc. I could also build the rope from separate box RigidBodies and connected them with joints, but why to do it (adjust physical settings, defines constraints etc.) if the rope physics is already provided by Bullet and works great. The only issue is how to render the rope...

Any hints? Is my approach correct?
TIA
weldeini
 
Posts: 1
Joined: Thu Nov 07, 2019 2:00 pm

Return to General Development

Who is online

Users browsing this forum: No registered users and 1 guest