Search Forums

(Advanced Search)

Latest Threads
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
13-09-2025, 05:32 AM
» Replies: 0
» Views: 100
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,854
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 224
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 481
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 726
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 805
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 544
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 517
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,015
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 864

 
  IndexOutOfRangeException
Posted by: SimonP - 21-12-2022, 11:26 PM - Forum: Obi Softbody - Replies (3)

Hello! I just bought the asset. When I try to add the skeleton in the blueprint it gives me this error.
If I generate it without skeleton it works fine.

Any suggestions?

P/d: Unity 2021.3.9f clean project



IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.GraphColoring.AddConstraint (System.Int32[] particles) (at Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs:44)
Obi.ObiSoftbodySurfaceBlueprint+<CreateClustersFromSkeleton>d__51.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:618)
Obi.ObiSoftbodySurfaceBlueprint+<Initialize>d__37.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:215)
Obi.ObiActorBlueprint+<Generate>d__59.MoveNext () (at Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:282)
Obi.CoroutineJob+<Start>d__15.MoveNext () (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>d__15:MoveNext() (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:ShowCoroutineProgressBar(String, IEnumerator&) (at Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs:21)
Obi.ObiActorBlueprintEditor:Generate() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:131)
Obi.ObiActorBlueprintEditor:OnInspectorGUI() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:163)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr, Boolean&)

Print this item

  Odd collision detection behaviour for objects at non 90 degree angle
Posted by: Moon_Hermit - 20-12-2022, 06:34 PM - Forum: Obi Softbody - Replies (2)

Hello

I'm trying to use a script to detect when the gameobject the player gameobject has collided with and then run another line of code once detected.

The issue I am having is the player detects the other gameobject without physically touching it if the other gameobject is rotated at an angle that is not a multiple of 90. What seems to be happening is the other gameobject has an area around it with a rotation of 0-degrees. When the player enters this area it detects the other gameobject. In the screenshot below the white cube is the object I want to detect rotated to a 45-degree angle and the red cube is the area the player is detecting rotated 0-degrees.

   

I've also included a screenshot of the white cube's collider setup.

   

I want to fix this issue so the player only detects the other gameobject when physically colliding with it.

I'm not an experienced programmer and am at a loss for what to do so any help would be greatly appreciated. 

Thank you.

Below is the code I'm using to detect the object the player is colliding with.

Code:
private void Solver_OnCollision(ObiSolver solver, ObiSolver.ObiCollisionEventArgs e)
    {    
        foreach (Oni.Contact contact in e.contacts)
        {
            ObiColliderBase collider = ObiColliderWorld.GetInstance().colliderHandles[contact.bodyB].owner;

            print(collider.transform.gameObject);

Print this item

  Softbody broken with URP?
Posted by: softphysics - 18-12-2022, 05:24 AM - Forum: Obi Softbody - Replies (1)

[Image: Screenshot%202022-12-17%20212121.png?dl=1]

Hi, I just added the softbody asset to a URP project for the first time and tried some of the demo scenes and they all seem broken. See above image with mesh not deforming correctly. Is the asset compatible with URP?

Print this item

  Overwriting Particles As Capacity Reached
Posted by: mapleleaf4evr - 18-12-2022, 02:04 AM - Forum: Obi Fluid - Replies (1)

Hi there,

I am trying to implement a use of Obi Fluid where bleeding is simulated and remains on the ground.  I would like to use an emitter that continually emits particles even once the particle limit (capacity) for the blueprint is reached.  I only want particles to be destroyed/recycled after the maximum amount of particles have been spawned so that there is a continuous emission.  Once the emission stops, I would like the particles that have already been spawned and are sitting on the floor to remain there indefinitely or as long as possible.

Basically I don't want the particles to die until particle capacity is reached and then I only want them to die at a rate that is needed to continue emission.

From reading through these forums, I think this would be possible through emitter.KillParticle and setting lifespan to infinity.  Is this the correct/most performance efficient way to implement this?  I'm imagining that I would just write a script that checks if the number of particles is nearing max capacity and then starts to kill the oldest particles at the same rate they are being emitted.  Can this just go in any old Update() function or is there a better place to put it?

Thank you

Print this item

  softbody cut
Posted by: Seahorse - 15-12-2022, 05:16 AM - Forum: Obi Softbody - Replies (11)

First of all, thanks to OBI, this is the best pbd physics engine I've ever used.

I have a few questions about softbody cut:
1. Is there a plan to support cutting and tearing?
2. I implemented the method described in this post.
http://obi.virtualmethodstudio.com/forum...-3561.html
This should be the easiest way. However, there are too many problems, such as the performance, recalculation of the attachment and stitcher brought by the new softbody objects, and the continuation of collision posture, which are all troublesome

3. Can i reframe the softbody by redividing the particle and Constraints just as you did with rope cutting?

4. I do not understand the relationship between softbody Constraint, ConstraintBatch and Particle. Could you explain it?
http://obi.virtualmethodstudio.com/manua...aints.html
Only rope and cloth are available here


Thanks a lot in advance Gran sonrisa

Print this item

Pregunta NullReferenceException Blueprint Edit
Posted by: brootas - 14-12-2022, 10:44 PM - Forum: Obi Cloth - Replies (8)

Hello,

When I create a Blueprint, I'm able to Generate it, but when I click Edit, I get a NullReferenceException that repeats every few seconds, and the scene that opens is empty. I've switched to the Default layout, and that didn't fix it. I switched projects, tried again, and had the same issue.

I'm using MacOS Monterey 12.5.1, and Unity 2022.2.0b10.

P.s. I found a similar thread by GinHuang, and even though it was not quite the same problem, I downloaded the patched 'ObiSkinnedClothBlueprint.cs' with fingers crossed but it did not resolve my issue.


Here's the error:

NullReferenceException: Object reference not set to an instance of an object
Obi.ObiActorBlueprintEditor.OnSceneGUI (UnityEditor.SceneView sceneView) (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:336)
UnityEditor.SceneView.CallOnSceneGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:3780)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2811)
UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2481)
UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2322)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:376)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:675)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:535)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Renderer/UIRenderer/UIRenderers.cs:130)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRenderChain.cs:518)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRepaintUpdater.cs:79)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/VisualTreeUpdater.cs:111)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Panel.cs:997)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Panel.cs:1058)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:453)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:205)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

Print this item

  "Look rotation viewing vector is zero" Error Message
Posted by: DragonControl - 14-12-2022, 09:18 PM - Forum: Obi Rope - Replies (2)

I keep getting the following error message and I don't know what I'm doing to cause it or how to avoid it:

Look rotation viewing vector is zero
UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3)
Obi.ObiRopeCursorEditor:DrawGizmos (Obi.ObiRopeCursor,UnityEditor.GizmoType) (at Assets/Obi/Editor/RopeAndRod/ObiRopeCursorEditor.cs:91)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Print this item

Guiño Bouncy Ropes?
Posted by: roberthey - 14-12-2022, 06:56 PM - Forum: Obi Rope - Replies (4)

Hi,

me again. After my previous two posts which were related to making a wobbly weiner (for anyone with a similar endeavour here are the links: http://obi.virtualmethodstudio.com/forum...-3690.htmlhttp://obi.virtualmethodstudio.com/forum...-3693.html) I now want my weiner to also be bouncy. 

Sounds weird I know but the behaviour I want to achieve is to have it bounce of a floor it is hitting .... 

Well. The only Idea I had was to change the stickiness of my collision material to a negative value (I tried -1) and set the stick distance to something arger than 0 (I tried 0.1). That way (according to the drawing in the article here http://obi.virtualmethodstudio.com/manua...rials.html) a bouncy behaviour should occur - in my mind.

You guessed it right, it does not. Am I doing something wrong or is that behaviour not achievable with Obi Rope?

Best, 

Robert

Print this item

  Initial setup, rope is very springy
Posted by: lela_tabathy - 14-12-2022, 12:59 PM - Forum: Obi Rope - Replies (1)

Hi, I've followed the initial setup to create a basic rope. What settings do I need to adjust to make the rope feel more "heavy" and realistic? Right now, when I move it (attached one end to another game object and moving that around in the scene view), the rope moves like it weighs nothing at all and is going all over the place.
I'm having a hard time finding anything about this in the User manual, and the tutorial videos also don't show this.

Thanks!

Print this item

  2D Rope Rotation
Posted by: DragonControl - 13-12-2022, 08:26 PM - Forum: Obi Rope - Replies (4)

I've been encountering a glitch ever since the newest update of the OBI rope (I don't think it happened with 6.4, but I could be wrong) where the rope will sometimes rapidly flatten and unflatten itself so that it basically looks like it is flickering. I can get it to happen consistently, but only with a weird setup where the rope is laid across the top of a box in the right way. There is a chance that I'm doing something wrong on my end, but I don't know what I could have done that causes this behavior. I've posted screenshots below of the rope in both states. It was hard to get the second screenshot as it only flattens for a split second at a time.

Rope Not Flat:

[Image: Y4pA2MM.png]

Rope Flat:

[Image: Xkq66zR.png]

Print this item