コード例 #1
0
        private void ApplyRandomFroce()
        {
            gameObject.SetActive(true);

            Vector3 randomForce = BUtils.GetRandomVector(forceIntensity, forceIntensity);

            myRigidBody.AddForce(randomForce, ForceMode.Impulse);

            Vector3 randomRotation = BUtils.GetRandomVector(0.0f, 360.0f);

            myRigidBody.AddTorque(randomRotation, ForceMode.Impulse);
        }
コード例 #2
0
 private void Button_ReleaseBall()
 {
     ReleaseBall(BUtils.GetRandomVector(1.0f, 1.0f));
 }