Posts by Voley69

    My solution.



    Code: VelocityPong.cs
    1. public class VelocityPong : MonoBehaviour
    2. {
    3. public float xSpeed;
    4. public float ySpeed;
    5. void Start()
    6. {
    7. GetComponent<Rigidbody>().AddForce(new Vector3(xSpeed, ySpeed, 0), ForceMode.Impulse);
    8. }
    9. }

    My solution.


    My solution.


    My solution.


    This challenge is a simpler version of challenge 13.


    My solution.


    My solution.


    My solution.

    My solution.


    My solution.


    Here is my solution.




    My solution.


    My solution.


    Ok this took me a while. First, GameObject.Find if used with prefab, doesnt use the real name, but adds "(Clone)" to it, which killed my logic.



    Code: BallContactDestroyer.cs
    1. public class BallContactDestroyer : MonoBehaviour
    2. {
    3. private void OnCollisionEnter(Collision other)
    4. {
    5. Destroy(gameObject);
    6. }
    7. }