unity3d

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 – 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

Unity 3D – Pathfinding – NavMesh Obstacles

Unity 3D – Pathfinding – NavMesh Obstacles

These items are not baked into the NavMesh, and thus can move around freely while getting in the way.
Questi ostacoli non possono essere attraversati dal’agente, non sono calcolati nel NavMesh e si possono muovere liberamente nella scena.

1. Create a NavMesh
2. Create a ‘targetNavigation’ object
3. Create a NavMeshAgent

4. Create a game object and name it ‘moving obstacle’

Select ‘moving obstacle’ Inspector> ‘Add component’> Navigation> Nav Mesh Obstacle setup

– Radius: radius of the obstacle collider
– Height: height of ther obstacle collider
– Move Threshold (soglia):
– Carve (intagliare):

By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Pathfinding – NavMesh Obstacles