TO SQUASH: Jesus!!
This commit is contained in:
@@ -33,7 +33,7 @@ public class BasicBall : BallBase
|
||||
|
||||
// Update is called once per frame
|
||||
void FixedUpdate()
|
||||
{
|
||||
{
|
||||
AnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(0);
|
||||
|
||||
if (stateInfo.IsName("BasicBallMove")) {
|
||||
@@ -77,6 +77,8 @@ public class BasicBall : BallBase
|
||||
collision.gameObject.CompareTag("FruitBall") ||
|
||||
collision.gameObject.CompareTag("Shark"))
|
||||
{
|
||||
// Force reset the rotation.
|
||||
transform.rotation = Quaternion.identity;
|
||||
ContactPoint2D contact = collision.GetContact(0);
|
||||
speed = Vector2.Reflect(speed, contact.normal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user