- Home /
[Joints] How to set connectedbody using raycast ?
Hi, I'd like to connect two rigidbodies together but I'm facing a problem :
Raycast ---------------------> ◘ ◘²
What I want to do is set the second cube(²) as connected body to the first cube.
Example : I want to nail a wooden plank to another one located underneath the first one.
1) I aim at the point on the first wooden plank where I want the nail(joint) to be.
2) When I click, the joint is created and the second plank which is underneath becomes the connectedbody to the first one.
I've done the first step above but I don't know how I can implement the second one. Could you help me please ? Thanks a lot.
Your answer
Follow this Question
Related Questions
Raycast layer problem 1 Answer
How do i add a layer to a gameobject? 1 Answer
How to create User layer that acts like the "Ignore Raycast" layer? 1 Answer
Unity Raycasting a tag rather than layer 1 Answer
Problem with raycast aim, need help ignoring layers/tags and pointing at the end of the ray. 2 Answers