Hi there!
To me it just seems like your ropes are being forced by some external agent (maybe a collider at their ends?) They’re extremely overstretched at the ends, causing them to coil in the middle.
Can you share more details about your collider setup?
(18-03-2022, 06:04 PM)josemendez Wrote: [ -> ]Hi there!
To me it just seems like your ropes are being forced by some external agent (maybe a collider at their ends?) They’re extremely overstretched at the ends, causing them to coil in the middle.
Can you share more details about your collider setup?
Sorry for the delay i was out all last week,
At each end there's dupplicate of the same box here his value :
[
attachment=1325]
if I set both the rope/rod and the collider to collide with nothing, they act more 'normal' but i doubt that how this should work?
(28-03-2022, 09:36 AM)oppay Wrote: [ -> ]At each end there's dupplicate of the same box here his value :
if I set both the rope/rod and the collider to collide with nothing, they act more 'normal' but i doubt that how this should work?
If you attach a rope inside a collider that's set to collide with the rope, the simulation will behave in a weird way. Think about it: you're asking the rope to stay inside a collider using an attachment, but at the same time to stay outside of it (since that's what collisions do). That's simply impossible to achieve, an object cannot be simultaneously inside and outside a volume.
You should use collision filters to solve this. Note that you don't need to set both the entire rope and the collider to "collide with nothing", you just want to set the endpoints of the rope to not collide with the collider's collision category. For more info on how filters work, see:
http://obi.virtualmethodstudio.com/manua...sions.html
(28-03-2022, 09:58 AM)josemendez Wrote: [ -> ]If you attach a rope inside a collider that's set to collide with the rope, the simulation will behave in a weird way. Think about it: you're asking the rope to stay inside a collider using an attachment, but at the same time to stay outside of it (since that's what collisions do). That's simply impossible to achieve, an object cannot be simultaneously inside and outside a volume.
You should use collision filters to solve this. Note that you don't need to set both the entire rope and the collider to "collide with nothing", you just want to set the endpoints of the rope to not collide with the collider's collision category. For more info on how filters work, see:
http://obi.virtualmethodstudio.com/manua...sions.html
So to make my rope bridge i will need to attach all the plank to the rope, but set them in a different collider filter then the one of the rope? It sound pretty redundant to add a attachment manually for each plank. Is there a better way to connect them?
(28-03-2022, 10:34 AM)oppay Wrote: [ -> ]So to make my rope bridge i will need to attach all the plank to the rope, but set them in a different collider filter then the one of the rope?
Correct.
(28-03-2022, 10:34 AM)oppay Wrote: [ -> ]So to make my rope bridge i will need to attach all the plank to the rope, but set them in a different collider filter then the one of the rope? It sound pretty redundant to add a attachment manually for each plank. Is there a better way to connect them?
You must attach the planks to the rope
somehow, right?. You can't magically have planks attached to the rope without actually telling the engine they must be attached and where along the rope(s) you wish to attach them.
If you were to use Unity's joints to do this, you'd be in the exact same situation: you would need to manually create all individual joints in-between the planks and attach them to the plank rigidbodies. For long bridges with a lot of planks this is a huge time sink indeed.
However doing this manually isn't the only option. You can also create attachments programmatically, or even just the underlying constraints. This does require some C# scripting skills on your part. See Adding/removing constraints in the scripting section of the manual:
http://obi.virtualmethodstudio.com/manua...aints.html
If you're going to have multiple bridges in your game, writing yourself some sort of BridgeBuilder script that automatically creates the ropes, places the planks, and attaches them to the ropes would be a time saver in the long run.
(28-03-2022, 10:42 AM)josemendez Wrote: [ -> ]Correct.
You must attach the planks to the rope somehow, right?. You can't magically have planks attached to the rope without actually telling the engine they must be attached and where along the rope(s) you wish to attach them.
If you were to use Unity's joints to do this, you'd be in the exact same situation: you would need to manually create all individual joints in-between the planks and attach them to the plank rigidbodies. For long bridges with a lot of planks this is a huge time sink indeed.
However doing this manually isn't the only option. You can also create attachments programmatically, or even just the underlying constraints. This does require some C# scripting skills on your part. See Adding/removing constraints in the scripting section of the manual: http://obi.virtualmethodstudio.com/manua...aints.html
If you're going to have multiple bridges in your game, writing yourself some sort of BridgeBuilder script that automatically creates the ropes, places the planks, and attaches them to the ropes would be a time saver in the long run.
I do have some skill in C#, so i'm going to take a look to make a bridge builder, if i can only have to place the 'start' and 'end' of the bridge and have it create bridge it would be quite faster then doing it by hand. I'm surprise to not see obi use to make bridge.
(28-03-2022, 10:56 AM)oppay Wrote: [ -> ]I'm surprise to not see obi use to make bridge.
Bridges are usually built as a sequence of rigidbodies and joints. If you think about it, the ropes are pretty much always completely tensed up in between planks due too their own weight. In a bridge they never have a chance to bend, curl up, intersect themselves, each other or other geometry in the level:
they're there just to support the planks. Since there's pretty much zero visible rope dynamics going on in a typical bridge, there's no benefit in using a rope simulation for this.
You can use ropes if you want very detailed dynamics (the bridge twisting on itself, planks detaching from one of the 2 ropes...) or if your bridge is destructible and you really want to see dangling ropes when the bridge is destroyed. But for typical bridges joints are simpler, faster to setup and don't require using a third party physics engine.