04-12-2021, 09:54 AM
First off this all works fine if generated in editor beforehand. If I create a rope and hit play it works just fine with my procedurally generated Obi Colliders.
However if I generate my rope at runtime there seems to be no recognition of the Obi Colliders.
The way I have generated the ropes is basically like so, I pretty much copied the documentation from the website. What am I missing to get them to partake in the physics system?
Thanks
However if I generate my rope at runtime there seems to be no recognition of the Obi Colliders.
The way I have generated the ropes is basically like so, I pretty much copied the documentation from the website. What am I missing to get them to partake in the physics system?
Code:
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.path.Clear();
//for each point in the navmesh path generated
blueprint.path.AddControlPoint(relativePosition, pointHandleIn, pointHandleOut, pointNormal, .1f, .1f, 1, 1, Color.white, i.ToString());
blueprint.path.FlushEvents();
blueprint.GenerateImmediate();
var ropeRenderer = connectedWire.GetComponent<ObiRopeExtrudedRenderer>();
var rope = g.GetComponent<ObiRope>();
ropeRenderer.section = Resources.Load<ObiRopeSection>("DefaultRopeSection");
rope.ropeBlueprint = ScriptableObject.Instantiate(blueprint);
rope.transform.SetParent(solverParent.transform, true);
Thanks