isit posible to remove transform.parent quickly? in the OnTriggerEnter2D

void OnTriggerEnter2D(Collider2D coll)
{
anim.SetBool(“isJumping”, false);
if (coll.gameObject.CompareTag(“movingplatform”))
{
this.transform.parent = coll.transform;

        }
        if (Input.GetButtonDown("Jump") && grounded)
        {
            this.transform.parent = null;

            anim.SetBool("isJumping", true);
            if (rb.velocity.y == 0)
            {
                rb.velocity = Vector2.up * JumpForce;
            }
        }
    }
    void OnTriggerExit2D(Collider2D coll)
    {   
        if (coll.gameObject.CompareTag("movingplatform"))
            this.transform.parent = null;
        
    }

i don’t see any delay in code , what do you mean by quickly ?

the delay when i pressing spacebar to jump in the moving platform i need to press a few time able to jump… because player is inside the movingplatform

Why do you must jump when it is juts in trigger? you can not do jump except in it?


The jump not response quickly maybe cause the trigger is not get call on the time (is not like update that get call frame to frame). why you do not make a jump in update?