This week I attempted to create a castle using some of the basic geometry tools in Rhino. I took screenshots of the castle model from different perspectives to showcase the model's details.
using UnityEngine; public class BoxieMotion : MonoBehaviour { Rigidbody myBody; public Rigidbody CappyBody; public Material cappyColor; public float xForce = 300; public float yForce = 300; // Start is called before the first frame update void Start() { myBody = this.GetComponent (); cappyColor.SetColor("_Color",Color.white); } // Update is called once per frame void Update() { if (Input.GetKeyDown("space")) { myBody.AddForce(xForce,yForce,0); } } private void OnCollisionEnter(Collision collision) { if (collision.gameObject.name == "Sphero") { Debug.Log("COLLIDED"); CappyBody.AddForce(0, 300, 0); cappyColor.SetColor("_Color", Color.yellow); } } }
Comments
Post a Comment