Unity 3D – Get Axis – rigidbody.AddForce

Unity 3D – Get Axis – rigidbody.AddForce

1. Create a Plane (Ground) with:
– Mesh Collider

2. Create over the plane a Sphere with:
– Mesh Collider
– Rigid Body
– PlayerController.JS:

#pragma strict
 
function Start () {
 
}
// Theese variables are public to make the code easy-reusable
// You can setup theese variables from Inspector
var speed : float;

function FixedUpdate () {
     // Get User Input START
     var moveHorizontal : float= Input.GetAxis ("Horizontal");
     var moveVertical : float= Input.GetAxis ("Vertical");
     // Get User Input END

     var movement : Vector3= new Vector3 (moveHorizontal, 0.0f, moveVertical);
     rigidbody.AddForce (movement * speed * Time.deltaTime); // Time.deltaTime Use this function to make your game frame rate independent
}
By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Get Axis – rigidbody.AddForce

Unity 3D – Cloth Simulation

Unity 3D – Cloth Simulation

Base

1. MAIN TOP MENU> GameObject> Create Other> Sphere

2. MAIN TOP MENU> GameObject> Create Other> Cloth, put the cloth over the Sphere

3. InteractiveCloth> Inspector> Interactive Cloth> Mesh> select a mesh

TOP BUTTON ‘Play’

By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Cloth Simulation

Unity 3D – Character Controller – Standard Assets

Unity 3D – Character Controller – Standard Assets

1. MAIN TOP MENU> Assets> Import Package> Character Controller

2. Project> Standard Assets> Character Controllers>

– 3rd Person Controller
Trird Person Controller (Script)
Idle Animation (Animation Clip)
Walk Animation (Animation Clip)
Run Animation (Animation Clip)
Jump Animation (Animation Clip)

– First Person Controller
Character Motor
Movement
Jumping
Moving Platform
Sliding

By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Character Controller – Standard Assets

Unity – Build – Web Player

Unity – Build – Web Player

0. MAIN TOP MENU> File> Buil Settings> Select Web Player

1. MAIN TOP MENU> File> Buil Settings> ‘Player Settings’> Inspector to setup

2. MAIN TOP MENU> File> Buil Settings> ‘Build’> Scenes in Build> DRAG AND DROP the _Scenes> YourScene

3. 2. MAIN TOP MENU> File> Buil Settings> ‘Build’> Create Folder ‘Builds/space_shooter’> Save

Web Player Streaming

1. MAIN TOP MENU> File> Buil Settings> check ‘Streamed’
2. MAIN TOP MENU> File> Buil Settings>’Player Settings’> Inspector> Other Settings> First Streamed Level

Advantage:

1. If there is a fast download of the first level you will not see the loader progress bar
2. Not annoing download time improves web gaming experience for the end user

This is the best way:

50 KB display the logo and menu (4 seconds)
320 KB let the user play a tiny tutorial level or let him do some fun interaction in the menu (20 seconds)
800 KB let the user play the first small level (50 seconds)
Finish downloading the entire game within 1-5 MB (1-5 minutes)

There is no reason why all music must be available when the game starts. Externalize the music and load it via the WWW class

Reference:
http://docs.unity3d.com/Documentation/Manual/WebPlayerStreaming.html

By |Unity3D, Video Games Development|Commenti disabilitati su Unity – Build – Web Player

Unity – Build – Flash Player

Unity – Build – Flash Player

0. MAIN TOP MENU> File> Buil Settings> Select Flash

1. MAIN TOP MENU> File> Buil Settings> ‘Player Settings’> Inspector to setup

2. MAIN TOP MENU> File> Buil Settings> ‘Build’> Scenes in Build> DRAG AND DROP the _Scenes> YourScene

3. 2. MAIN TOP MENU> File> Buil Settings> ‘Build’> Create Folder ‘Builds/space_shooter’> Save

WARNING: Development Build it is not compressed!

Errors

‘Error building Player: Exception: Could not start java’ you need to install 32-bit JRE:

1. Download: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jre-7-download-432155.html

2. For Win7 64bit is: jre-7-windows-i586.exe (it is 32 bit jre because Unity is 32 bit!)

3. Run the installer as Administrator

By |Unity3D, Video Games Development|Commenti disabilitati su Unity – Build – Flash Player