Unity3D Tutorial Uplifting !

Advertisemen

Unity3D Tutorial Uplifting !

Easter video series !







DIRECT DOWNLOAD HERE




THIS IS BACKUP  IN TEXT FORM  TUTORIAL Uplifting !

1. Create New C# and name it : liftup


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


using UnityEngine;

// :) up up you goo
[RequireComponent(typeof(BoxCollider))]
public class liftup : MonoBehaviour 
{
public float lift; //the lifting force applied to player :)
void Awake()
{
collider.isTrigger = true;
}
// lol
//also lift player upwards
void OnTriggerStay(Collider other)
{
if(other.rigidbody)
other.rigidbody.AddForce(Vector3.up * lift, ForceMode.Force);
 }
    }







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

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