Help Newby lost, Trying to make a robe bridge - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Help Newby lost, Trying to make a robe bridge (/thread-3366.html) |
Newby lost, Trying to make a robe bridge - oppay - 18-03-2022 Hi, Sorry for my bad english, it's not my first language. I'm new to using obi rope and rod, so the solution is probably simple, but i can't figure it out despite looking at the video and reading the manual. I'm tryinig to make a simple rope bridge, with a couple plank pin to two ropes. Before i use a static 3D model (see image model), but I would like to recreate those model with obi rope so they react to the player passing on them. [attachment=1315] I wasn't sure if i should use robe or Rod so i try to set up both to see what would work the best (i don't need them to move much). In Red plank is the rope and in green the rod. Both use the same solver value, but i have 2 solver in my scene (one for each).I added a particule renderer on all the rope and rod and 2 particule attachement to pin the rope/rod to the plank on each side. The attachement are in static, but changing them to dynamic don't change anything to the result. They also have similar path with a little down curve. They also have a resolution of .5 thickness of 0.1 If they stay about as such, it would be fine for me, but when i press play... [attachment=1316] they get all twisted in the middle and i don't understand what's causing this and with this happening when i just try to link a rope to 2 fix plank, i worry about what it will be when i try to add plank to this bridge. Please help, i'm at a lost. RE: Newby lost, Trying to make a robe bridge - josemendez - 18-03-2022 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? RE: Newby lost, Trying to make a robe bridge - oppay - 28-03-2022 (18-03-2022, 06:04 PM)josemendez Wrote: Hi there! 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? RE: Newby lost, Trying to make a robe bridge - josemendez - 28-03-2022 (28-03-2022, 09:36 AM)oppay Wrote: At each end there's dupplicate of the same box here his value : 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/manual/6.3/collisions.html RE: Newby lost, Trying to make a robe bridge - oppay - 28-03-2022 (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. 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? RE: Newby lost, Trying to make a robe bridge - josemendez - 28-03-2022 (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/manual/6.3/scriptingconstraints.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. RE: Newby lost, Trying to make a robe bridge - oppay - 28-03-2022 (28-03-2022, 10:42 AM)josemendez Wrote: Correct. 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. RE: Newby lost, Trying to make a robe bridge - josemendez - 28-03-2022 (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. |