Latest Threads |
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
13-09-2025, 05:32 AM
» Replies: 0
» Views: 96
|
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,847
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 220
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 478
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 720
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 801
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 540
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 514
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,012
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 860
|
|
|
Synchronizing softbody, doesn't render |
Posted by: Milionario - 06-12-2022, 02:41 PM - Forum: Obi Softbody
- Replies (5)
|
 |
So I tried using the same script I had for synchronizing ropes, but instead of using a ObiRope component, I replaced it with ObiActor for a more general approach since it's just synchronizing particles. The ropes work fine but the softbody doesn't, the positions are received correctly, I am drawing debug lines to visualize them:
![[Image: r91h9FW.png]](https://i.imgur.com/r91h9FW.png)
You can see the softbody shape, its there.
This script works just fine for ropes, there isn't any rope specific code there.
This is how I am setting the solver positions
Code: var wantedHostTimeStamp = Host.Now - HostTimespan.FromSeconds(ReceiveDelay);
var states = GetStatesAroundHostTimeStamp(wantedHostTimeStamp);
if (states.HasStates)
{
var interpolationFactor = GetInterpolationFactorBetweenStates(wantedHostTimeStamp, states.Item1, states.Item2);
for (int i = 0; i < actor.activeParticleCount; i++)
{
var globalPosition = actor.solver.transform.TransformPoint(Vector3.Lerp(states.Item1.Positions[i], states.Item2.Positions[i], interpolationFactor));
Debug.DrawLine(Vector3.zero, globalPosition);
actor.solver.positions[actor.solverIndices[i]] = Vector3.Lerp(states.Item1.Positions[i], states.Item2.Positions[i], interpolationFactor);
actor.solver.invMasses[actor.solverIndices[i]] = 0;
}
}
This is where I actually set the particles positions in the solver:
Code: actor.solver.positions[actor.solverIndices[i]] = Vector3.Lerp(states.Item1.Positions[i], states.Item2.Positions[i], interpolationFactor);
actor.solver.invMasses[actor.solverIndices[i]] = 0;
Gettings lots of these:
}
So it looks like its trying to set invalid values for the softbody transform on Softbody script line 281
It works just fine for the ropes and its the same component that i am using to synchronize them, what can I do to track this problem down?
|
|
|
Roll rope/chain around object |
Posted by: Samadhi - 29-11-2022, 08:58 PM - Forum: Obi Rope
- Replies (1)
|
 |
Hello, everyone!
I wanted to do a chain that rolls around a tube/pipe but I'm having a hard time thinking how to achieve it.
So far I have set a chain. One end is attached to a fixed point and the other end is attached to a point that rolls around the tube.
The tube has an obi collider and the chain reacts to it. It actually wraps itself around the tube but it sometimes stutters or just jumps randomly. Do you have any idea why that might be?
Like so:
Also, for explaining purposes I removed two blocks in the vide above. Those blocks are meant to prevent the chain from just sliding out of the tube. But when they are there, the chain has a hard time trying to do a second "layer" and, instead, jumps randomly as it collides with itself.
It seems that removing ant gravity makes it less "jittery" but I need the chain to have gravity.
And for an extra, when the chain does stay rolled around the tube, it seems to be a small gap between them. Is there a way to reduce it?
Some extra information, my obi rope version is 6.5, my unity version is 2021.3.8f1, and the solver in charge of the chain only has the constraints of distance, particle collision / queries, collision, and chain active with 8 sequential iterations (except chain which only has a 3) and the default relaxation of 1.
Thanks in advance.
As a reference, the point that circles around the tube, does so through animation like this:
|
|
|
|