Hey guys i created a sphere and generated the sphere colliders , while base is a scaled square … it has a box collder … but when run the game my sphere is passing through the plane … well , i attached the following script coz i was playing wid da vectors … as i start the game my sphere which is the target is changing it’s position .
#pragma strict
var target : Rigidbody;
private var Dir : Vector3 ;
private var px : Vector3= Vector3(2,2,2);
function Update ()
{
if(Input.GetMouseButtonDown(0))
{
Dir.y = target.position.y + px.y;
}
if(Input.GetMouseButtonDown(1))
{
Dir.y = target.position.y - px.y;
}
target.position = Dir;
}