Unity : How to enable gravity on GameObject

Advertisemen

Unity : How to enable gravity on GameObject



























DIRECT DOWNLOAD HERE






THIS IS BACKUP  IN TEXT FORM  

This one script  enable Gravity...

1. Create New java and name it : wht you like...

2. Copy & Past this text and save java :
----------------------------------------­­­­­------------------------------------­-­-­-­-­-

#pragma strict

var Obj : GameObject;

function Start () {

Obj.SetActive(true);

}

function OnTriggerEnter (trigger:Collider) { if(trigger.collider.tag=="Player") 



Obj.rigidbody.useGravity = true ;

}
 







 ----------------------------------------­­­­­------------------------------------­-­-­-­-­-










THIS IS BACKUP  IN TEXT FORM  

This one script  disable Gravity...

1. Create New java and name it : wht you like...

2. Copy & Past this text and save java :
----------------------------------------­­­­­------------------------------------­-­-­-­-­-

#pragma strict

var Obj : GameObject;

function Start () {

Obj.SetActive(true);

}

function OnTriggerEnter (trigger:Collider) { if(trigger.collider.tag=="Player") 



Obj.rigidbody.useGravity = false ;

}
 







 ----------------------------------------­­­­­------------------------------------­-­-­-­-­-











Advertisemen

Disclaimer: Gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami disini.

Tidak ada komentar:

Posting Komentar

© Copyright 2017 Tutorial Unity 3D