I'm wondering what is the best way to create a rope that is circular. As the path edit tool isn't too accurate when used in the editor, I attempted to do this in code/runtime with the below, I've just taken out parts relevant to the co-ordinates of the points. The result is a square with rounded corners aha. Any assistance would be appreciated.
Code:
var p0 = new Vector3(0, 0, -1);
var p1 = new Vector3(1, 0, 0);
var p2 = new Vector3(0, 0, 1);
var p3 = new Vector3(-1, 0, 0);
bluePrint.path.AddControlPoint(p0, new Vector3(-1, 0, 0), new Vector3(1, 0, 0), Vector3.up, 0.1f, 0.1f, 1, 1, Color.yellow, "p0");
bluePrint.path.AddControlPoint(p1, new Vector3(0, 0, -1), new Vector3(0, 0, 1), Vector3.up, 0.1f, 0.1f, 1, 1, Color.yellow, "p1");
bluePrint.path.AddControlPoint(p2, new Vector3(1, 0, 0), new Vector3(-1, 0, 0), Vector3.up, 0.1f, 0.1f, 1, 1, Color.yellow, "p2");
bluePrint.path.AddControlPoint(p3, new Vector3(0, 0, 1), new Vector3(0, 0, -1), Vector3.up, 0.1f, 0.1f, 1, 1, Color.yellow, "p3");
I was just wondering seeing that vertex weights could be applied through editing a blueprint, our system generates meshes procedurally, we were planning for the weight to be determined by another objects signed distance field. I was wondering if the API supported manually manipulating vertex weight through code as I was unable to find any information related to this.
I recently purchased obi fluid and imported the asset package. No sample scenes are included. Where can I find some of the sample scenes in promotional videos for this product?
Hi there!
I currently have my rope being laid down on a surface as it is being extruded with the Obi Cursor. However, it will not fully lay down on the ground (see attached picture). It is very close to being laid down but levitates. I'm not sure what is causing this problem, like if there is something in collisions that I need to change, etc. Does anyone know a couple of different reasons I need to look into why it is not fully laid down on the surface?
I have tried increasing gravity, messing around with the particle mass and thickness in Edit Path. I have tried surface-based collisions both on and off. I have also tried changing the thickness of the Obi Collider script. However, if it is -0.1, it makes the rope bounce up and down, or if it's -0.01, it stays there still.
I am facing an issue when I generate a ObiRope in script which is used in RopeNet example (please see attached video)
Everything works fine but the generated rope does not collide with the Ground or anything else which has an ObiCollider.
Normal rope when created in editor collides as expected with the ground. Is there something I'm missing in the settings? Please help.
Thanks,
Abhi
Code:
public void GenerateRope(Vector3 pointA, Vector3 pointB, ObiCollider start, ObiCollider end)
{
// Create a rope
var ropeObject = new GameObject("solver", typeof(ObiRope), typeof(ObiRopeLineRenderer));
var rope = ropeObject.GetComponent<ObiRope>();
var ropeRenderer = ropeObject.GetComponent<ObiRopeLineRenderer>();
rope.GetComponent<MeshRenderer>().material = material;
rope.GetComponent<ObiPathSmoother>().decimation = 0.1f;
ropeRenderer.uvScale = new Vector2(1, 5);
// Setup a blueprint for the rope:
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = blueprintResolution;
blueprint.thickness = blueprintThickness;
blueprint.pooledParticles = blueprintPooledParticles;
// convert both points to the rope's local space:
pointA = rope.transform.InverseTransformPoint(pointA);
pointB = rope.transform.InverseTransformPoint(pointB);
I created skinned cloth and tried to collide it with an obi collider.
I used the man_trenchcoat example model and everything worked fine (recreate using just the model, made new blueprint).
But when I used other models the collision won't work at all. I tried on a few different models, some worked and some did not.
Is there a special requirement on the input model for the collision to work?
I even created a single plane with two bones (top won't have physics, skin radius and backface all 0. bottom part will have physics)
I can see some physics effect of stretching with Obi cloth on, but it won't react to my collider. In the same scene, the collision works well with the model I created using Obi example files.
(The forum software won't let me add two videos to a post, so I'm just linking the one above instead.)
I'd like to interpolate my characters' transforms in LateUpdate so that their motion is smoother. I'm using a character controller called KinematicCharacterController, which implements interpolation how you'd expect - which is to say, characters have transforms that are restored to their last-ticked position at the start of the character update, and then those transforms are position/rotation-interpolated in LateUpdate.
This causes ugly jittering with my current ObiCloth setup, presumably because characters are not at their simulated positions when they're rendered:
Is there a solution to this? (I'd rather not simulate cloth in LateUpdate if I can avoid it, given the caveats in ObiLateUpdater.)
Hi, I got a character with dress(skinned) and I want to have the lower part of the dress to be simulated as normal cloth(not skinned). How should I do it?
The user manual said I could free/unfix particles, then simulated them as usual but I am not sure how to do it. Thanks.
On two different occasions now, I have experienced a crash (i.e., handled by Unity's crash handler, exiting the application) in a build with the Burst backend. Since both crashes have the exact same stack trace, it appears to be a systematic issue somewhere. See the attached log.
Note that the outputs from GetLastError are localized and my OS is German. Es wurde versucht, auf eine unzulässige Adresse zuzugreifen translates to There was an attempt to access an invalid address.
As can be seen in the log, the crash happens in Obi.BurstColliderWorld.IdentifyMovingColliders. Unfortunately, I cannot give any concrete steps to reproduce it. What I can tell, however, is that both times, the crash occured when there were "many" Obi colliders and rigidbodies. I cannot tell how many precisely, but picture a fighting game where each character has 15 Obi colliders/rigidbodies (one for each part of a ragdoll) and there are always exactly 12 Obi rods in the scene (ropes of a ring). A rough guess of 16 characters seems plausible, that should give 240 colliders and rigidbodies, but not all of them are active (enabled flag) at all times.
So just to rule this out: Is there any known limit on the number of active Obi colliders / rigidbodies with the Burst backend?
What would speak against that is that the crash doesn't occur right away, but really only after an extended playtime of 10 to 15 minutes. This also makes it a bit hard to reproduce.
My environment:
Built player on Windows 10, 64-bit
Unity 2021.2.4
Burst 1.6.3
Collection 1.1.0
Jobs 0.11.0-preview6
Mathematics 1.2.5
Please let me know if I can provide any further meaningful information. I also have the crash dumps in case you can use them.
EDIT: I just tried a lengthy session using the Oni backend and everything seems fine, so this should be specific to Burst only.
I am working on my crane simulator and I have 2 (related?) issues.
1. The rope I am using is still too stretchy. I want to simulate a stiff metal cable which should never stretch in length. On instantiation, or whenever i move the boom, the rope bounces the hook around like it is on a rubber band.
and
2. When I adjust the angle of the boom, the rope and attached hook do not hang down properly. See attached screen shots. For the first screen shot, the solver was a child of the boom so I figured that what was causing the problem (the rope jutted out at the converse angle of rotation). So I moved the solver outside of the boom game object's hierarchy and attached the rope to a point on the boom (instead of to itself). That helped a little but as you can see in the second screen shot the rope is still behaving strangely. It is not straight and the hook game object isn't directly below the attachment point as it would be if gravity pulled on it
I think the second issue was because I had set the Sleep parameter for the solver too high (I was trying to make the rope less stretchy to solve issue 1) If I decrease the sleep threshold the rope does hang properly but moving the crane makes the hook flail around spastically.
How can i get a stiff rope that still hangs directly down without stretching?