Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Selecting Objects in Hierarchy Triggers Unintentional Physics
#1
Hi,

I’m using Obi Rope Version 7.0.1 with Unity 2022.3.42f1, and my project is built with URP. I’m trying to create a lamp with a cable in VR that is attached to the ceiling. I based it on the "Chains" scene but encountered some issues:

  1. Whenever I select something in the Scene, Hierarchy, or Project, it triggers movement of the object hanging on the rope.
  2. When the object is hanging on the rope, it randomly jumps after standing still for some time, and this behavior repeats constantly.
I've attached a video demonstrating the issue:
https://www.youtube.com/watch?v=CNmVGeAQKo8

Additional Question: Is there a more efficient or performant method for creating hanging lamps with cables compared to using the "Chains" scene as a base?

Any assistance would be greatly appreciated.
Reply
#2
Hi!

This is normal behavior, due to the way physics work: when you select something in-editor, there's a noticeable performance spike due to Unity having to load object properties and display them in the inspector. Since that frame takes considerably longer than a "normal" frame, rigidbodies have a chance to fall due to gravity for more time than usual, so the rope has to apply a larger than usual force to get them back into position. This is the "jump" you noticed.

(19-08-2024, 11:52 PM)PRodi Wrote: Is there a more efficient or performant method for creating hanging lamps with cables compared to using the "Chains" scene as a base?[/font][/size][/color]

Hanging a rigidbody is just a matter of using a dynamic attachment instead of a static one. The difference in performance between both types of attachments is negligible.

The "chains" scene does nothing out of the ordinary that would make it more expensive, you can use it as a template just fine. Let me know if you run into any performance problems.

kind regards,
Reply
#3
(20-08-2024, 08:41 AM)josemendez Wrote: Hi!

This is normal behavior, due to the way physics work: when you select something in-editor, there's a noticeable performance spike due to Unity having to load object properties and display them in the inspector. Since that frame takes considerably longer than a "normal" frame, rigidbodies have a chance to fall due to gravity for more time than usual, so the rope has to apply a larger than usual force to get them back into position. This is the "jump" you noticed.


Hanging a rigidbody is just a matter of using a dynamic attachment instead of a static one. The difference in performance between both types of attachments is negligible.

The "chains" scene does nothing out of the ordinary that would make it more expensive, you can use it as a template just fine. Let me know if you run into any performance problems.

kind regards,

Now everything is clear - thank you for your time and explanation! Sonrisa


I wrote a script that sets the object to kinematic at the start and turns it off when the lamp is hit by a collision. When the lamp slows down, it turns kinematic back on. I made a build for the Meta Quest 3, and it performs extremely well.
Reply