Latest Threads |
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
13-09-2025, 05:32 AM
» Replies: 0
» Views: 95
|
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,845
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 218
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 475
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 717
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 799
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 538
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 512
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,010
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 858
|
|
|
Ropes frozen in standalone build |
Posted by: mr-matt - 30-09-2020, 10:49 AM - Forum: Obi Rope
- Replies (7)
|
 |
Strange issue following on from my last post about a null error on particle attachments that only occurred in standalone builds, but not the editor.
My ropes are frozen in place and the dynamic pin constraint appears to have no affect only in the standalone build.
![[Image: xiwfgX7.png]](https://i.imgur.com/xiwfgX7.png)
In this screenshot the ropes ends are supposed to be connected to the pallet with dynamic pin constraints.
My code:
Code: // m_Ropes is an array of 4 ObiRopes
for (int i = 0; i < m_Ropes.Length; i++)
{
// Create a new blueprint
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.path.Clear();
blueprint.path.AddControlPoint(m_Ropes[i].transform.InverseTransformPoint(m_HelicopterAnchorPoints[i].position), m_HelicopterAnchorPoints[i].up, -m_HelicopterAnchorPoints[i].up, m_HelicopterAnchorPoints[i].up, 0.1f, 0.1f, 1, 1, Color.white, "Start");
blueprint.path.AddControlPoint(m_Ropes[i].transform.InverseTransformPoint(anchorPoints[i].position), anchorPoints[i].up, -anchorPoints[i].up, anchorPoints[i].up, 0.1f, 0.1f, 1, 1, Color.white, "End");
blueprint.path.FlushEvents();
blueprint.GenerateImmediate();
// Set the same phase as the colliders
for (int x = 0; x < Mathf.Min(blueprint.phases.Length, m_EndParticleCollisionFilterCount); x++)
{
blueprint.phases[x] = m_EndParticlePhase;
}
for (int x = blueprint.phases.Length - 1; x > Mathf.Max(blueprint.phases.Length - 1 - m_EndParticleCollisionFilterCount, 0); x--)
{
blueprint.phases[x] = m_EndParticlePhase;
}
m_Ropes[i].ropeBlueprint = blueprint;
maxLength = m_Ropes[i].restLength;
// Get components
mainAttachments[i] = m_Ropes[i].gameObject.AddComponent<ObiParticleAttachment>();
palletAttachments[i] = m_Ropes[i].gameObject.AddComponent<ObiParticleAttachment>();
// Find the particle groups
var groups = m_Ropes[i].blueprint.groups;
mainAttachments[i].Awake();
palletAttachments[i].Awake();
// Attach sub rope to main rope
mainAttachments[i].target = m_ObiCollider.transform;
mainAttachments[i].particleGroup = groups[0];
mainAttachments[i].attachmentType = ObiParticleAttachment.AttachmentType.Static;
// Attach the rope to the pallet
palletAttachments[i].target = m_Pallet;
palletAttachments[i].particleGroup = groups[groups.Count - 1];
palletAttachments[i].attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
m_Ropes[i].gameObject.SetActive(true);
}
There are no errors or warnings in the output log file.
|
|
|
Null error in particle attachment in standalone build |
Posted by: mr-matt - 29-09-2020, 05:58 AM - Forum: Obi Rope
- Replies (4)
|
 |
I'm attaching an ObiParticleAttachment to my ropes at runtime by AddComponent and I then set the target (among other things). In the editor this works fine but in a standalone build I get this error:
Code: NullReferenceException: Object reference not set to an instance of an object
at Obi.ObiParticleAttachment.Disable (Obi.ObiParticleAttachment+AttachmentType type) [0x00001] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\Obi\Scripts\Common\Utils\ObiParticleAttachment.cs:337
at Obi.ObiParticleAttachment.Bind () [0x00001] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\Obi\Scripts\Common\Utils\ObiParticleAttachment.cs:221
at Obi.ObiParticleAttachment.set_target (UnityEngine.Transform value) [0x00019] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\Obi\Scripts\Common\Utils\ObiParticleAttachment.cs:52
at Winglett.RR.Vehicles.DropRope+<MakeRope>d__35.MoveNext () [0x004ff] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\_Core\Content\Season 03\Vehicles\Scripts\Rope\DropRope.cs:157
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <4756199cf52a4f14b33cdcc5659f782e>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <4756199cf52a4f14b33cdcc5659f782e>:0
at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <09bef5ecb05c47869e8650c7594390b8>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.WorkRequest:Invoke()
UnityEngine.UnitySynchronizationContext:Exec()
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
I'm using the latest Obi version, Unity 2019.4.10f1, and HDRP 7.4.3.
|
|
|
Rope lifting heavy objects |
Posted by: mr-matt - 27-09-2020, 12:25 AM - Forum: Obi Rope
- Replies (5)
|
 |
Hello!
I'm trying to setup my ropes to lift objects of large mass. However, the rope stretches by at least 2x the resting length and the object remains stationary on the ground. I've fiddled with all the settings and I don't think I quite understand. How might I configure it to reduce the stretching?
|
|
|
KillParticle after collision and shouldn't return |
Posted by: adamgffrd - 26-09-2020, 02:20 PM - Forum: Obi Fluid
- Replies (2)
|
 |
Good Morning,
I am having an issue that I am hoping to get some help on.
- I have a collider that will destroy individual particles when collision takes place. I need to Disable, Kill, change Life of the singular particle so that it doesn't go back into the pool and get re-emitted.
Scenario: Barrel tips over, at certain angle emitter speed goes up, emission begins. The particles that have been emitted and then collided with get "cleaned" up and in this process, destroyed and prevented from going back into the emitter pool.
Just having trouble with the code line for disabling the particles from the pool that have been collided with.
Thanks!
What i have thus far:
if(collider.tag == "ParticleKiller")
{
// do something with the collider.
int killThisParticle = solver.particleToActor[contact.particle].indexInActor;
emitter.KillParticle(killThisParticle);
// get particle indices and
//disable from active emitter
}
|
|
|
Detect Collider |
Posted by: yetkintmn - 25-09-2020, 09:40 AM - Forum: Obi Softbody
- Replies (7)
|
 |
Hello everyone, I haven't done anything I want to do on Unity:
I could not find how to use this code with Soft Body without using colliders. In Unity, ready colliders (boxes, sphere) do not sit properly on the object.
private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "Glass")
{
CreateLittleWaters();
Destroy(gameObject);
}
else if (collision.gameObject.tag == "Floor")
{
Destroy(gameObject);
}
}
|
|
|
Getting/Setting Particle Positions on Runtime |
Posted by: Jackson - 22-09-2020, 03:34 PM - Forum: Obi Rope
- Replies (5)
|
 |
Greetings,
I'm looking to create a system that will allow me to tangle some ropes in runtime and then be able to recreate that tangling. My logic is to get the position of the particles, store them and then use them to re-position the particles of that rope later on.
My approach ivolves actor.GetParticlePosition(solverIndex), which, as stated in the post mentioned bellow, returns the renderable positions. I'm able to see results tho, but the ropes, altohugh they tangle the way they supposed to, they move to some other position and then return to their repsective handles, untying themselfs (I have the start and end partcile attached to an object so I can move the rope from one end, while the other remains stationary)
I found this post http://obi.virtualmethodstudio.com/forum...ad-50.html which pretty much wanted to do the same thing (although I'm not involving any networking in the proccess), the problem is tho that I can't seem to get particles' position data from Oni like this
Code: Oni.GetParticlePositions(ObiRope.Solver.OniSolver, particlePositions, ObiRope.UsedParticles, ObiRope.particleIndices[0]);
since the GetParticlePositions is not present in the Oni class. I'm using v5.3 of Obi rope.
I'm I searching on the wrong path, or am I missing something essential here due to inexperince.
Thanks in advance,
Jackson.
|
|
|
|