- Home /
how to drop mesh in all of directions?
hi my dears, i want in my android game create a drop system. how to create this? similar to Can Knockdown drop system!accurate.. this is my script but it is just in one direction.! #pragma strict
var halghe : Rigidbody;
var halghe2 : Rigidbody;
var speeddrop : float;
function Start () {
}
function Update () {
if(Input.GetTouch(0).phase == TouchPhase.Moved)
{
var Partab : Rigidbody = Instantiate(halghe,this.transform.position,this.transform.rotation);
Partab.AddForce(this.transform.forward * speeddrop);
}
}
//tavabe-e karbordie kole script
Comment
Your answer
Follow this Question
Related Questions
Work out the angle from center of screen to Touch or Mouse Click 1 Answer
(Android) Swiping direction 1 Answer
Android: Get Direction from touch 0 Answers
Collision objects when I drag and drop them by touch (Unity Android) 0 Answers
Switching a GUIbuttons texture when holding your finger on it? 1 Answer