Practice the book on the seventh chapter of the Crazyball,
1.Camera trailing, this example does not use the existing Carmerafollow script, but directly according to Ball's Pos to follow, of course, the use of interpolation, and set the damping Spring mode:
Transform.position = Vector3.lerp (transform.position, Newpos, Time.deltatime * dampspeed);
2. The application of single-case mode in game Manger management;
Public static Mycrazyballmanager MCB; // single-case mode?
Application of 3.Trigger Trigger
This example uses trigger to detect the occurrence of a collision event ... Two places: One is the collision with the diamond, the other is the collision with the box;
void Ontriggerenter (Collider other) { if (other.tag=="Pickup")// { MyCrazyBallManager.mCB.FoundGems (); Destroy (Other.gameobject); } Else { } }
In the game can also be used to achieve automatic door opening and closing .
Unity3d Introduction to mastering the seventh chapter of physics engine application summary