Aligning object from multiple points according to ground
I need to allow players to drag objects around the surface of my lowpoly ground so that the object sticks to the ground from certain points (in this case all the 6 legs). I tried Raycast to set position and rotation of the object with:
transform.position = hit.point;
transform.rotation = Quaternion.FromToRotation (Vector3.up, hit.normal);
This works quite nice but it always leaves some of the legs in the air because I set position and rotation of the whole transform not each leg individually. I could Raycast all of the legs individually but after that how can I position and rotate legs so that other parts of the model stays with the legs and the model doesn't "break".
Also I tried to give each leg a rigidbody and box collider but that just breaks the model by shooting the legs somewhere.
All ideas are welcome.
Your answer
Follow this Question
Related Questions
Dynamic sorting objects on terrain 0 Answers
Turn a Terrain into a Contoured Map 4 Answers
Terrain Lightmap - Just Give Up... 1 Answer
Load heightmap automatically 0 Answers
chacacter teleporting outside of terrain 0 Answers