- Home /
Connecting Pipes at points
I am going through building pipe placing functionality and trying to find a good simple way of place pipes in the correct connected side of another pipe. Right now I am kind of figuring out a way of determining position and rotation based on the pipe it is connecting to but there are so many different types of pipes and angles.
Is there a good way of doing this with a hinge? Kind of snap one pipe to another at a specific location on the pipes. (I have child empty objects that mark the pipe connection locations).
I am open to other ideas.
Can i see the Screenshot of your game? i have the same problem too .
Answer by Kiwasi · Jun 25, 2014 at 07:53 PM
I've done something similar with hingeJoints in the past. You can use connectedBody to determine what the pipe is attached to. Use connectedAnchor to determine the attachment position. Then you can useLimits to drive the joint to a specific angle.
In some cases you have to disable the rigidbody before you move it and enable it afterwards. Otherwise the physics engine has kittens.
Your answer
Follow this Question
Related Questions
How to recheck collision? 1 Answer
A node in a childnode? 1 Answer
Advice for Intersecting Colliders 0 Answers
Question on Collider Resource Consumption 0 Answers
C# Check if Collider2D[] Doesn't contain Scripted GameObject 1 Answer