Hey, sorry if my format is not the best ( this is my first comment ever), I designed a workaround. There is no way that just the effector is going to work well with the tilemap composite collider but i really didnt want to make prefabs or different objects for the 2 way plartforms, so i came up with this:
First, i made two different layers:
the ground layer:
and the twowayground:
each with it’s collisionscript.
Then in the scripts that handles the player’s collisions i check where am i standing on or if im inside the twoway layer:
public bool CheckIfOnGround()
{
return Physics2D.OverlapCircleAll(_groundCheck.position, _groundCheckRadius, _whatIsGround)
.Any(collider => !collider.isTrigger);
}
public bool CheckIfInsideTwoWayGround()
{
return Physics2D.OverlapCapsuleAll((Vector2)transform.position + _playerRectCollider.position, new Vector2(_playerRectCollider.size.x / 2f, _playerRectCollider.size.y), CapsuleDirection2D.Vertical, 0, _whatIsTwoWayGround)
.Any(collider => !collider.isTrigger);
}
public bool CheckIfOnTopOfTwoWayGround()
{
return Physics2D.OverlapCircleAll(_groundCheck.position, _groundCheckRadius, _whatIsTwoWayGround)
.Any(collider => !collider.isTrigger);
}
so now i now when im in contact with that layer, now the player script has a method to ignore the collisions with the twoway layer:
public void IgnoreTwoWayCollision(bool value)
{
switch (value)
{
case true:
SpriteRenderer.color = Color.yellow;
IgnoreLayerMask(Core.CollisionSenses.whatIsTwoWayGround, true);
break;
case false:
SpriteRenderer.color = Color.white;
IgnoreLayerMask(Core.CollisionSenses.whatIsTwoWayGround, false);
break;
}
}
so now i place the conditions on each player state:
OnTheGroundedState:
public override void LogicUpdate()
{
base.LogicUpdate();
if (IsGrounded == false && IsOnTwoWayGround == false && JumpInput == false)
{
player.PlayerStates.FallingState.StartCoyoteTime();
stateMachine.ChangeState(player.PlayerStates.FallingState);
}
if (JumpInput)
{
if(IsOnTwoWayGround && YInput < 0)
{
player.IgnoreTwoWayCollision(true);
stateMachine.ChangeState(player.PlayerStates.FallFromTwoWay);
}
else if(playerData.currentJumpsLeft > 0 && IsTouchingCeiling == false)
{
core.Movement.CheckIfShouldFlip(XInput);
stateMachine.ChangeState(player.PlayerStates.JumpState);
}
}
}
in my Jumping state:
public override void Enter()
{
base.Enter();
player.IgnoreTwoWayCollision(true);
}
In my InFallingState:
public override void Enter()
{
base.Enter();
player.IgnoreTwoWayCollision(core.CollisionSenses.CheckIfInsideTwoWayGround());
}
public override void LogicUpdate()
{
base.LogicUpdate();
if(IsOnTwoWayGround)
{
if(YInput < 0)
{
stateMachine.ChangeState(player.PlayerStates.FallFromTwoWay);
}
else
{
if (Mathf.Abs(core.Movement.RB.velocity.y) < 0.1)
{
player.IgnoreTwoWayCollision(false);
stateMachine.ChangeState(player.PlayerStates.LandState);
}
}
}
}
and the result is this: ( i added the yellow color to know when i’m ignoring the two way layer)

Hope it helps you
PD: If you have any advice on how can i improve my posting, i would be very thankful