Destroyable tile blocks with TilesExtra
still issues with collider
This commit is contained in:
@@ -36,7 +36,7 @@ public class Character : MonoBehaviour
|
||||
_isOnBridge = mapElement == MapElementType.Bridge && !_isFalling;
|
||||
|
||||
float v_movement=0;
|
||||
if (mapElement==MapElementType.Wall || _isOnLadder || _isOnBridge)
|
||||
if (mapElement==MapElementType.Wall || _isOnLadder || _isOnBridge|| mapElement == MapElementType.BreakableWall)
|
||||
{
|
||||
var leftCheck = GetMapElement(Vector2.left);
|
||||
var rightCheck = GetMapElement(Vector2.right);
|
||||
@@ -93,7 +93,7 @@ public class Character : MonoBehaviour
|
||||
|
||||
private MapElementType GetMapElement(Vector2 direction)
|
||||
{
|
||||
var raycastHit=Physics2D.BoxCast(_boxCollider.bounds.center, _boxCollider.bounds.size, 0f, direction, .1f, _mapLayer);
|
||||
var raycastHit=Physics2D.BoxCast(_boxCollider.bounds.center, _boxCollider.bounds.size, 0f, direction, 0.1f, _mapLayer);
|
||||
if (raycastHit)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user