Latest Threads |
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
13-09-2025, 05:32 AM
» Replies: 0
» Views: 105
|
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,865
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 225
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 488
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 728
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 806
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 548
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 519
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,016
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 866
|
|
|
Use of vector4 to translate particles? |
Posted by: emz06 - 17-09-2020, 11:37 AM - Forum: Obi Fluid
- Replies (1)
|
 |
Hi there,
I replied again to the thread about translation of particles but you may have not seen it pop up.
I'm trying to use the vector4 structure to move particles as your code suggested, but I'm not sure how to use it.
Please see my code below. Note: the platform is moved by IK, so the movement happens at the end of the frame.
What did I do wrong there?
public IEnumerator ParticlesFollowPlatform_IE()
{
float duration = 3;
float i = 0;
Vector3 translation = platform.position - platformLastPosition;
platformLastPosition = platform.position;
while (i < duration)
{
yield return new WaitForEndOfFrame();
i += Time.deltaTime;
Vector3 translation = platform.position - platformLastPosition;
platformLastPosition = platform.position;
for (int x = 0; x < myActor.solverIndices.Length; x++)
{
int solverIndex = myActor.solverIndices[x];
myActor.solver.positions[solverIndex] += new Vector4 (translation.x, translation.y, translation.z, 0) ;
myActor.solver.prevPositions[solverIndex] += new Vector4(translation.x, translation.y, translation.z, 0);
}
}
}
|
|
|
Moving a Particle Attachment at runtime problems |
Posted by: dasbin - 17-09-2020, 12:40 AM - Forum: Obi Rope
- Replies (1)
|
 |
I'm trying to attach an object at an arbitrary point on a rope (wherever the closest particle is to where it collides with the rope).
Requires a bit of context - For various reason I also want to avoid putting Obi Rigidbodies on everything the rope might interact with, so I have a single invisible Obi Rigidbody that always just stays attached to the rope at some point, and my other game objects attach (via Unity Joints) to that Obi Rigidbody whenever they are going to attach to the rope. That Obi Rigidbody is supposed to move itself around on the rope, at the time of the other object attaching, to the nearest particle.
The workflow is:
- Obi Particle Attachment is pre-configured on the rope, attached to an invisible small Obi Rigidbody (ObiR) in the middle of the rope.
- Some object (ObjA) enters the rope's trigger zone
- I iterate through the rope's particles to get the nearest particle to ObjA.
- I set Obi Particle Attachment's "attached Transform" to null, disconnecting ObiR
- I modify the Particle Attachment's Particle Group List (which only contains a single particle) to contain only that nearest particle I found.
- I manually teleport ObiR to that same particle's position
- I call ObiR.UpdateIfNeeded()
- I also call Physics2D.SyncTransforms() just in case
- I set Obi Particle Attachment's "attached Transform" back to ObiR, re-attaching it at its new position - but it just snaps back to its old position.
- (Then I attach ObjA to ObiR with a Unity joint)
I can see the Particle Group be modified correctly in realtime.
However, where this falls down is that ObiR, which is attached to that Particle Group, does *not* follow that Particle Group position, regardless of whether or not I manually move it there first before letting the simulation continue. ObiR snaps back to its original position and stays that distance away from its new particle, as though its anchor point to the rope has compensated for the changed particle index.
What am I doing wrong, and what I can change to have the desired effect?
Well, now I feel dumb. The problem was here:
- I manually teleport ObiR to that same particle's position
I was using rigidbody.position to do this.
But I guess this waits for the next physics update or something.
Just setting transform.position fixed it.
According to Unity you are not supposed to move rigidbodies this way, but I can't think of what else to do if I want it to move immediately.
|
|
|
Fluid Doesn't Show on Oculus Quest Build |
Posted by: dodgevision - 15-09-2020, 12:01 AM - Forum: Obi Fluid
- Replies (1)
|
 |
Hi, I was wondering how I get Obi Fluid working for the Quest. It's all working in unity editor, but when I build to the quest there is no fluid anywhere. I tried adding Obi Fluid Renderer to all the cameras, but no luck haha. What am I doing wrong?
Thanks for your help in advance! =)
|
|
|
Resetting simulation on-animation-change |
Posted by: ThoughtMango - 14-09-2020, 12:37 PM - Forum: Obi Cloth
- Replies (2)
|
 |
Hello,
I'm wondering if there's an easy way to reset simaulation of particles of a cloth back to it's skinned values, and reset all forces on it with some form of callback?
I'm running into an issue where changing an animation on a character "explodes" the simulation suddenly.
Thanks
|
|
|
Can Obi do this? |
Posted by: JordanTama - 14-09-2020, 10:47 AM - Forum: Obi Cloth
- Replies (3)
|
 |
Hi,
I'm interested in using Obi Cloth for a project I am working on, however, I'd like to know if it will actually help me with what I'm aiming to do.
In the attached image, I have two submeshes. I've stored multiple vertex pairs (linked with the white gizmo lines). I would like to apply a force to individual vertices that move each pair of linked vertices towards each other in a way that is physically simulated so that it fits realistically around the cylinder, with the linked edges behaving like seams.
Otherwise, I also noticed a 'balloons' feature. If I placed the two meshes flat against each other and connected them, would I be able to balloon around the cylinder?
If it's possible to achieve this outcome this way, I would love to know. If there's a better/supported way to achieve this too, please let me know!
Thanks in advance,
Jordan
|
|
|
|