Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiColliders and Procedural Load
#3
In response, the suggestion to add another component to every collider that ever exists in my scene won't work for me and I'll have to think of something else. I can accept this and keep a favorable impression of this asset because mine is not a typical use case.

But to expand on my side note, I'm finding it extremely challenging to get Obi Rope to work at all. It would be easy to dismiss my troubles by saying that Obi exposes a lot of options making it more flexible but harder to configure. However, the users who require a robust product also need to implement it in a "real" way - IE doing it procedurally instead of using the amateur approach of setting up a prefabricated scene for every "level" and making players wait for loading time every time they walk through a door. Unless you're making the eighty billionth Mario clone, that just doesn't work for most people anymore. 

Now far be it from me to ask you to write my code for me, but I've read through every forum post and the entire Tutorials section and it's left me more confused than when I started. Everything is organized requiring the user to understand the entire Obi system instead of just what they're using, and there are constant references to "solver's ObiColliderGroup" which I don't even think applies anymore, and the Creating a pendulum video doesn't even mention ObiColliders. Everything in those resources assumes a static game world that is not loaded in real time. I've tried copying how ObiRopeHelper.cs works three times from scratch. Everything I do trying to figure it out results in some bizarre and unpredictable behavior making me think my entire methodology is wrong, which wouldn't surprise me at all since I've been completely guessing my way through it.

There are only a handful of functions needed to make rope work in a procedural environment, and I know a huge number of users would appreciate guidance in this area:

public class MyRope { //NOT a monobehavior
        private ObiRope rope;

       
        /// <summary>
        /// Creates a straight rope anchored to a transform at the top.
        /// Transform may or may not move around and may or may not have a rigidbody.
        /// When you call this the rope will appear in the scene and immediately interact with gravity and objects with ObiColliders.
        /// Called from anywhere (main thread only)
        /// Called when there is an empty scene (aside from passed transform) with nothing loaded and no prefabs available.
        /// </summary>
        public void make_rope(Transform anchored_to, Vector3 attachment_point_offset, float rope_length) { 
            //WHAT GOES HERE???

            [i]//
rope = ????
[/i]

        }

        /// <summary>
        /// make_rope and add_pendulum may be called on the same frame.
        /// Just adds a pendulum to the rope on the un-anchored end.
        /// </summary>
        public void add_pendulum(ObiRigidbody pendulum, Vector3 attachment_point_offset) {
            //WHAT GOES HERE???
        }

        /// <summary>
        /// remove_pendulum and add_pendulum may be called on the same frame.
        /// </summary>
        public void remove_pendulum() {
            //WHAT GOES HERE???
        }

        /// <summary>
        /// Like extending or retracting a winch.
        /// May need to include changes to the iteration count, 
        /// tether setup, or rope weight to prevent rope stretching depending on length and attached mass.
        /// </summary>
        public void change_rope_length(float change_amount) {
            //WHAT GOES HERE???
        }
    }


I'm getting so frustrated trying to make this work that I've considered leaving a negative review - something I've never done after downloading over two dozen assets - and I probably would have already done so if not for the reasonable support response time with intelligent answers. I'm sure you can fill in the blanks and test within a couple of hours since you understand the product so well, and if you can't then it should only underscore the importance of this code sample. I made it extremely generic on purpose so it would benefit the largest amount of users; it doesn't suit my case perfectly but would tell me what I need to know to figure it out.

Thanks,

Jon
Reply


Messages In This Thread
ObiColliders and Procedural Load - by jonworks - 18-01-2018, 07:03 AM
RE: ObiColliders and Procedural Load - by jonworks - 01-02-2018, 08:23 PM