rev, v0.3
This commit is contained in:
@@ -41,6 +41,20 @@ public class Ball : MonoBehaviour
|
||||
float velocityMult = 1- Mathf.Clamp01(rb.linearVelocity.magnitude / maxWallStuckVelocity);
|
||||
|
||||
Debug.Log($"{collision.collider.name} hit ball @ {otherSpeed}, ball speed: {rb.linearVelocity.magnitude}");
|
||||
int mult=0;
|
||||
if(touchingB){
|
||||
mult++;
|
||||
}
|
||||
if(touchingT){
|
||||
mult++;
|
||||
}
|
||||
if(touchingL){
|
||||
mult++;
|
||||
}
|
||||
if(touchingR){
|
||||
mult++;
|
||||
}
|
||||
velocityMult *= mult;
|
||||
if (touchingR) {
|
||||
rb.AddForce(Vector2.left * otherSpeed *wallStuckFixForce * velocityMult * Time.deltaTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user