GetToolTipVelocity() public méthode

public GetToolTipVelocity ( ) : Vector3
Résultat Vector3
Exemple #1
0
    void Update()
    {
        ToolModel tool_model = GetComponent <ToolModel>();
        Tool      leap_tool  = tool_model.GetLeapTool();

        if (leap_tool == null)
        {
            return;
        }

        if (leap_tool.TipVelocity.Magnitude > VELOCITY_TRIGGER && wandSpawn != null && wait <= 0)
        {
            Vector3    tip_position = tool_model.GetToolTipPosition();
            GameObject spawn        = Instantiate(wandSpawn, tip_position, Quaternion.identity)
                                      as GameObject;
            spawn.rigidbody.velocity = tool_model.GetToolTipVelocity();
            Physics.IgnoreCollision(collider, spawn.collider);
            wait = SPAWN_WAIT_ITERATIONS;
        }

        wait--;
    }