Search Forums

(Advanced Search)

Latest Threads
Rope going through wall
Forum: Obi Rope
Last Post: josemendez
6 hours ago
» Replies: 5
» Views: 55
In SolidifyOnContact exsa...
Forum: Obi Fluid
Last Post: asimofu_ok
8 hours ago
» Replies: 5
» Views: 122
Change rod section at run...
Forum: Obi Rope
Last Post: matty337s
02-08-2025, 06:07 AM
» Replies: 0
» Views: 59
Sliding along a rope
Forum: Obi Rope
Last Post: vrt0r
01-08-2025, 07:43 PM
» Replies: 0
» Views: 46
Is it possible to render ...
Forum: Obi Fluid
Last Post: asimofu_ok
01-08-2025, 10:07 AM
» Replies: 2
» Views: 108
Cloth has stretchy behavi...
Forum: Obi Cloth
Last Post: Andreia Mendes
31-07-2025, 02:38 PM
» Replies: 22
» Views: 914
Get separate particles pa...
Forum: Obi Fluid
Last Post: slimedev
29-07-2025, 06:51 PM
» Replies: 6
» Views: 3,245
Solver outside of hierarc...
Forum: General
Last Post: Jawsarn
29-07-2025, 06:19 PM
» Replies: 4
» Views: 203
Rope ignoring colliders o...
Forum: Obi Rope
Last Post: josemendez
24-07-2025, 07:03 AM
» Replies: 1
» Views: 141
Ladder made by Ropes (Rat...
Forum: Obi Rope
Last Post: josemendez
23-07-2025, 01:43 PM
» Replies: 5
» Views: 338

 
  Cannot make a rope with multiple control points
Posted by: uatihb - 13-10-2023, 01:38 PM - Forum: Obi Rope - Replies (1)

Trying to setup a rope with variable thickness done by setting up multiple control points. Works in editor, until it doesn't. Can't really save it. Breaks the whole blueprint.
Obi 6.5.4
Unity 2021.3.22 & 2021.3.31
OS Ubuntu 20.04 & Windows 10



Quote:NullReferenceException: Object reference not set to an instance of an object
Unity.Collections.LowLevel.Unsafe.UnsafeUtility.WriteArrayElementWithStride[T] (System.Void* destination, System.Int32 index, System.Int32 stride, T value) (at /home/bokken/build/output/unity/unity/Runtime/Export/Unsafe/UnsafeUtilityPatched.cs:66)
Obi.ObiNativeList`1[T].set_Item (System.Int32 index, T value) (at Assets/ImportedAssets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs:64)
Obi.ObiActor.UpdateCollisionMaterials () (at Assets/ImportedAssets/Obi/Scripts/Common/Actors/ObiActor.cs:399)
Obi.ObiRope.SetupRuntimeConstraints () (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:208)
Obi.ObiRope.OnValidate () (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:178)
Quote:NullReferenceException: Object reference not set to an instance of an object
Unity.Collections.LowLevel.Unsafe.UnsafeUtility.WriteArrayElementWithStride[T] (System.Void* destination, System.Int32 index, System.Int32 stride, T value) (at /home/bokken/build/output/unity/unity/Runtime/Export/Unsafe/UnsafeUtilityPatched.cs:66)
Obi.ObiNativeList`1[T].set_Item (System.Int32 index, T value) (at Assets/ImportedAssets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs:64)
Obi.ObiActor.UpdateCollisionMaterials () (at Assets/ImportedAssets/Obi/Scripts/Common/Actors/ObiActor.cs:399)
Obi.ObiRope.SetupRuntimeConstraints () (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:208)
Obi.ObiRope.OnValidate () (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs:178)
UnityEditor.SerializedObject:ApplyModifiedProperties(SerializedObject)
Obi.ObiRopeEditor:OnInspectorGUI() (at Assets/ImportedAssets/Obi/Editor/RopeAndRod/ObiRopeEditor.cs:124)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
Quote:NullReferenceException: Object reference not set to an instance of an object
Unity.Collections.LowLevel.Unsafe.UnsafeUtility.ReadArrayElementWithStride[T] (System.Void* source, System.Int32 index, System.Int32 stride) (at /home/bokken/build/output/unity/unity/Runtime/Export/Unsafe/UnsafeUtilityPatched.cs:54)
Obi.ObiNativeList`1[T].get_Item (System.Int32 index) (at Assets/ImportedAssets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs:60)
Obi.ObiActor.GetParticlePosition (System.Int32 solverIndex) (at Assets/ImportedAssets/Obi/Scripts/Common/Actors/ObiActor.cs:682)
Obi.ObiPathSmoother.PathFrameFromParticle (Obi.ObiRopeBase actor, Obi.ObiPathFrame& frame, System.Int32 particleIndex, System.Boolean interpolateOrientation) (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs:125)
Obi.ObiPathSmoother.GenerateSmoothChunks (Obi.ObiRopeBase actor, System.UInt32 smoothingLevels) (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs:177)
Obi.ObiPathSmoother.Actor_OnInterpolate (Obi.ObiActor actor) (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs:62)
Obi.ObiActor.Interpolate () (at Assets/ImportedAssets/Obi/Scripts/Common/Actors/ObiActor.cs:1221)
Obi.ObiSolver.Interpolate (System.Single stepTime, System.Single unsimulatedTime) (at Assets/ImportedAssets/Obi/Scripts/Common/Solver/ObiSolver.cs:1670)
Obi.ObiUpdater.Interpolate (System.Single stepDeltaTime, System.Single accumulatedTime) (at Assets/ImportedAssets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:132)
Obi.ObiFixedUpdater.Update () (at Assets/ImportedAssets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:66)
Quote:NullReferenceException: Object reference not set to an instance of an object
Obi.ObiRopeBlueprint+<Initialize>d__2.MoveNext () (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprint.cs:46)
Obi.ObiActorBlueprint+<Generate>d__59.MoveNext () (at Assets/ImportedAssets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:282)
Obi.ObiActorBlueprint.GenerateImmediate () (at Assets/ImportedAssets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:273)
UnityEngine.Events.InvokableCall.Invoke () (at /home/bokken/build/output/unity/unity/Runtime/Export/UnityEvent/UnityEvent.cs:178)
UnityEngine.Events.UnityEvent.Invoke () (at /home/bokken/build/output/unity/unity/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_0.cs:58)
Obi.ObiPath.FlushEvents () (at Assets/ImportedAssets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPath.cs:403)
Obi.ObiPathEditor.RemoveControlPointsMode (UnityEngine.Matrix4x4 matrix) (at Assets/ImportedAssets/Obi/Editor/RopeAndRod/ObiPathEditor.cs:195)
Obi.ObiPathEditor.OnToolGUI (UnityEditor.EditorWindow window) (at Assets/ImportedAssets/Obi/Editor/RopeAndRod/ObiPathEditor.cs:125)
UnityEditor.EditorTools.EditorToolManager.OnToolGUI (UnityEditor.EditorWindow window) (at /home/bokken/build/output/unity/unity/Editor/Mono/GUI/Tools/EditorToolManager.cs:454)
UnityEditor.SceneView.DefaultHandles () (at /home/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3156)
UnityEditor.SceneView.DoOnGUI () (at /home/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2414)
UnityEditor.SceneView.OnSceneGUI () (at /home/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2255)
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 /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:372)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:693)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:665)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:658)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:618)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:607)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:535)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/IEventDispatchingStrategy.cs:113)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:35)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:26)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Events/MouseEventDispatchingStrategy.cs:19)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:381)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:344)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:306)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:270)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:75)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:372)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:222)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Panel.cs:420)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:468)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:211)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

Print this item

  ObiFluid installation problem
Posted by: CosmosST - 12-10-2023, 05:45 AM - Forum: Obi Fluid - Replies (6)

Hi,

Just purchased ObiFluid and looking forward to use it. However I have installation problem giving numerous errors on Unity 2022.37f1 , Apple Silicon.

I just tried to import it with the Package Manager on default 3D ( both non URP and URP ) projects. I have attached some screenshots for the error list.

Please advise on how to proceed for a clean installation. 

thank you.



Attached Files Thumbnail(s)
           
Print this item

  GetUnityCollider error cause errors in all instanses
Posted by: alex798 - 10-10-2023, 02:10 PM - Forum: Obi Rope - Replies (7)

Hello dear developer,

I messed up ropeAttachment in one scene (target with obiCollider was inactive) and after I went to other scenes with normal ObiRopes it was still causing this error in ObiColliderBase-> UpdateIfNeeded-> GetUnityCollider == null. 

Why it could be the case? (maybe U fixed this already - we didn't update lately)

Print this item

  Attaching rope control point to another object
Posted by: rohit_dhak - 09-10-2023, 07:51 AM - Forum: Obi Rope - Replies (1)

Hello

I have a rope with 2 control points (start and end)
   
       

I want to attach the control points to 2 objects in the scene

In the editor I did it manually by just moving the control points to place them approximately to the objects, however I want perfect placement of the control point so that they coincides the objects center.

The object onto which the start control point is attached is stationary while the 2nd object onto which the end control point is attached is moving.

For proper rope behavior I added particle attachment to the rope, however I am struggling to align the control points to the objects center.

Is there any simpler way to do it in the editor?

Thank you.

Print this item

  Change obi rope attachment target realtime with script
Posted by: Adammm - 06-10-2023, 03:26 PM - Forum: Obi Rope - Replies (3)

Hey! I was trying to change obi rope attachment the other day with script, and I couldn't make it happen. Whenever I do it manually in the inspector while playing the rope snaps to the new target position. But if I do it with script (just change the attachment script target to new transform), it changes the target but won't change the position nor do anything. 

Can somebody help me with this and if fix the issue?

Print this item

  Proper way to delete a (Obi)Rigidbody (if there is one)
Posted by: Lazerpants - 04-10-2023, 09:33 PM - Forum: Obi Rope - Replies (2)

Hello!

I have the rope set up in such a way where one spawns after the player character fires a bow at the ceiling, and when the arrow hits the ceiling, a rope extends downward, so that the character can climb up it. When the arrow hits the ceiling, everything spawns (solver, updater, renderer, etc.), along with a weight at the bottom of the rope so that the rope is always calm and held down as it gradually extends towards the ground. Everything works great and looks really good. Also I can do this pretty much as many times as I want (i.e. fire a bunch of arrows at the ceiling, one after another, and all of them spawn their own ropes with their own solvers and their own weights, etc. - no errors whatsoever).

Now I'm trying to change it so that there's only 1 rope at a time. When the player character fires another arrow at the ceiling, I want it to destroy the previous rope and then just make a new one in the new location. I'm using Unity's standard Destroy() method to destroy the rope parent (which has the solver and updater attached to it, then the rope itself which is a child, and the weight which is a separate object that's a child of the rope). Deleting the object throws no errors by itself. However, when I then go to shoot a new arrow to spawn a new rope, Unity starts throwing endless errors, which pertain to the Rigidbody of the weight object.

I'm assuming from the errors that the Obi code somewhere is trying to access/update the rigidbody that was attached to the weight at the bottom of the original rope, which has since been destroyed and no longer exists. Is there something I need to call first before destroying the rope, solver, and rigidbody so I can spawn the new rope without errors?

If I delete the old rope except for the weight with the rigidbody, then there are no errors. It's only when I delete the weight that it throws errors when I try to spawn a new rope. I'm assuming Obi has an internal list of rigidbodies it's trying to update when the new rope tries to spawn and I'm destroying them improperly.

Thank you in advance for your assistance.

   

Print this item

  How to add consintent speed/velocity to a rope?
Posted by: lacasrac - 04-10-2023, 05:16 PM - Forum: Obi Rope - Replies (1)

I tried with this:



private void AddVelocityToRope(float scale)
{
    var verticalActionValue = Input.GetAxisRaw("Vertical");
    var shiftPressed = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);

    if (verticalActionValue != 0 && shiftPressed)
    {
        var downPressed = verticalActionValue < 0;
        var s = 1;
        if (downPressed) s = -1;
        var bodyForward = _playerController.animator.bodyRotation * Vector3.forward * s;

        //SetRopeInvMasses(1 / mass);

        //igy egyenesebb a kotel mozgasa, mintha csak 1-et adnank at
        for (var i = 0; i < rope.elements.Count; i++)
        {
            var addVelocity = (bodyForward * (scale * 10f * maxRopeVelocityScale)).ToVector4();
            var v = solver.velocities[rope.elements[i].particle2];
            if (v.magnitude <= _newDamping * 2) solver.velocities[rope.elements[i].particle2] += addVelocity * (Time.deltaTime * 10);
        }
    }
}




But I get not the desitred behaviour.



So how can I add a consistent velocity to all my particles?



+1: How can I ignore bigger velocities than a limit? Sometimes just the rope immediatelly get a big velocity I don't know why...and the rope is just jumping..

Print this item

  Adding particles to a softbody?
Posted by: Henning - 04-10-2023, 11:26 AM - Forum: Obi Softbody - Replies (2)

Hi Obi team,

I am wondering if it is possible to manually / in scripts add particles to a softbody blueprint. Sometimes there are regions I would like to add details for better collision detection while the whole blueprint does not contain too many particles.

Also, is it possible to group particles in scripts? Manually selecting and creating groups is too time-consuming and they disappear once I regenerate the particles.

Thanks,

Print this item

  ObiPathSmoother needd for chain renderer
Posted by: lacasrac - 02-10-2023, 03:56 PM - Forum: Obi Rope - Replies (2)

Hello,

I use a lot of obiPathSmoother.GetSectionAt(T).position
But how can I use it with a chainrenderer? As I saw there is no ObiPathSmoother..

Thanks

Print this item

  help me to improve rope behaviour
Posted by: kebab_traume - 02-10-2023, 02:22 PM - Forum: Obi Rope - Replies (8)

Hi!
Have a rope and don't understand how to achieve this behaviour: when the end of a rope follows the direction of attached collider. Do I need additional points? Weight settings? I've added a couple of images what I have now and what I want to achieve.
Cheers, hope for your awesome support



Attached Files Thumbnail(s)
       
Print this item