#Prevent RigidBody 2D from pushing Eachother
1 messages · Page 1 of 1 (latest)
ok i did that
it works now
but now for the rb
@safe nebula
stilll weird
he keeps clipping
and stuff
i worked out something
and i will say it here
first of all my enemy has a child that child has an enemy layer not that important to have an enemy layer but just thought i would say
the enemy iself has a layer called enemy no collision i edited it so it doesnt collide with the player layer or bullet layer
the enemy doesnt have a box collider but has an rb and the child doesnt have an rb but it has a box collider the child checks for bullet and makes enemy lose health
if it works it works 👍
{
rb.velocity = new Vector2(direction.x, direction.y).normalized * dashForce;
rb.bodyType = RigidbodyType2D.Dynamic;
}
else
{
rb.bodyType = RigidbodyType2D.Static;
}
} ```when my enemy rushes at player