/// <summary>
    /// Simulate the path of a launched ball.
    /// Slight errors are inherent in the numerical method used.
    /// </summary>
    ///
    void simulatePath()
    {
        playerPosition = GetPlayerPosition.Instance();
        cameraPosition = GetCameraPosition.Instance();
        var launchedJewel = Instantiate(jewelModel, playerPosition.rightArmTRansform.position, playerPosition.transform.rotation * Quaternion.Euler(-45, 0, 0));

        launchedJewel.GetComponent <Rigidbody>().velocity = launchedJewel.transform.forward * launchSpeed;
    }
Example #2
0
    //private GetCameraPosition cameraPosition;


    public override void Use()
    {
        playerPosition = GetPlayerPosition.Instance();
        //cameraPosition = GetCameraPosition.Instance();
        var launchedJewel = Instantiate(jewelModel, playerPosition.rightArmTRansform.position, playerPosition.transform.rotation * Quaternion.Euler(-45, 0, 0));

        launchedJewel.GetComponent <Rigidbody>().velocity = launchedJewel.transform.forward * launchSpeed;
        base.Use();
        //Debug.Log(playerPosition.viewPoint.rotation.x);
        //Debug.Log( playerPosition.viewPoint.rotation.y );
        //Debug.Log( playerPosition.viewPoint.rotation.z );
        //StartCoroutine( ExecuteAfterTime( 10 ) );
        //Invoke( "DoSomething", 2 );
        RemoveFromInventory();
    }