Difference between revisions of "Unity3d"

From John Freier
Jump to: navigation, search
(Transform)
Line 9: Line 9:
  
 
To use movement with physics use Rigidbody.AddForce();
 
To use movement with physics use Rigidbody.AddForce();
 
+
rigidbody.AddForce (Vector3.up * 10);
 
http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.AddForce.html
 
http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.AddForce.html
  

Revision as of 14:39, 21 March 2013

Unity 3D

Scripting

Transform

To use movement without physics use Transform.translate();

Transform.Translate()

http://docs.unity3d.com/Documentation/ScriptReference/Transform.Translate.html

To use movement with physics use Rigidbody.AddForce();

rigidbody.AddForce (Vector3.up * 10);

http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.AddForce.html

2D Information

Camera

Change camera mode for Projection from Perspective(2 eye camera, so the sides will show) to Orthographic (1 eye camera).

Complete 2D View

Reference http://docs.unity3d.com/Documentation/Components/class-Camera.html

YouTube Videos

Unity 2D Game Tutorial - Part 1 Sprites and You. http://www.youtube.com/watch?v=DZucUpZtg2U