how do i make my object follow the ground? my ground is a mesh collider and id also like it to collide with my trees usinga box colider how can i achive this? atm it just floats 5 away from the main camera
ps still looking for help on the following the terrain
var player : Transform;
var ActualPlacedPeice : Transform;
function Start()
{
player = GameObject.Find("Player").transform;
}
function Update ()
{
var pos = player.position + player.forward * 5.0;
transform.position = pos + Vector3.up * 0.5;
transform.rotation = Quaternion.LookRotation(player.transform.forward);
if (Input.GetButtonDown("Fire1"))
{
var Build = Instantiate(ActualPlacedPeice,transform.position, transform.rotation);
}
}