01-05-2024, 10:43 AM
(This post was last modified: 01-05-2024, 10:46 AM by josemendez.)
(01-05-2024, 10:21 AM)Sky d Wrote: 1. I already attached my rigidbodies on each end of the rope, but now I realize I need to make the rope longer. How can I do that without needing to reposition and attach the precisely placed rigidbody cable connectors?
Hi!
There's no need to reposition the ends of the rope or the objects it is attached to. Just edit your rope's path to make it longer. You may add new control points in between the ends of the rope and move them around, or change their tangent handles to elongate the rope.
Note this assumes you don't need the rope to be a straight line at rest, if you need it, you will need to reposition the cable connectors as well.
In case you need to create arbitrarily shaped cables connecting objects at runtime that might be at arbitrary positions/distances from each other, you might want to create your ropes entirely at runtime.
(01-05-2024, 10:21 AM)Sky d Wrote: 2. After I make my master cable which has the two connectors, how can I safely create a prefab that I can re-use over and over? The cables I'm making also have custom snap functions that connect them to other gameobjects, so it's important that both ends are able to be freely manipulated by the player in VR. The goal here is to have different length & color coded prefab cables for the player to use. With each level, I hope to be able to just drop them in the heirachy going forward.
Just creating a prefab the usual way should work. Just make sure that you instantiate your prefabs inside a ObiSolver at runtime, otherwise they won't be simulated or rendered.