Quantcast
Channel: Unity3D Student » values
Browsing latest articles
Browse All 3 View Live

Beginner B26 – Using Mathf.Clamp to restrict values

Using Mathf.Clamp function to restrict values in your game mechanics to within a specified range. Code Used (Javascript) function Update () {  var xMove : float = Input.GetAxis("Horizontal") *...

View Article


Beginner B27 – Using Time.timeScale to Pause

How to Pause the game by implementing Time.timeScale. Code Used (Javascript) var paused : boolean = false;   function Update () {  if(Input.GetButtonUp("Jump")){   if(!paused){    Time.timeScale = 0;...

View Article


Beginner B28 – SendMessage() to Call External Functions

How to use SendMessage() to call functions in scripts attached to other objects. Code Used (Javascript) – Reactor.js var downTexture : Texture2D;   function React () {  renderer.material.mainTexture =...

View Article
Browsing latest articles
Browse All 3 View Live