- - Raycast information only stores the hit on the first thing it collides with.
- - can put object in 'ignore raycast layer'
- - nest animations under hierarchy layer: raycast hit to point item group to ground, then use script to animate item position itself for an animated object indicator.
- - Input.GetMouseButton(1); // mouse buttons:
- button 1 = 0 (Left)
- button 2 = 1 (Right)
- button 3 = 2 (scrollwheel)
- use animation panel to create animations within Unity.
- Animation system: can add keyframes and EVENTS. Events can call for functions like in actionscripting.
- Destroy(this.gameObject);
- Destroys this game object.
//------------ code bit --------------
void DestroyObject()
{
Destroy(this.gameObject);
}
//------- end code bit --------------
to destroy parent:
//------------ code bit --------------
void DestroyObject()
{
Destroy(this.gameObject.transform.parent.gameObject);
}
//------- end code bit --------------
No comments:
Post a Comment