#ok
1 messages · Page 1 of 1 (latest)
as i said, i modified the rigid body, not the collision
so they dont rigid'd each other
now this isn't showing the layer the collider is on lol
they collide
Yes they collide, you didn't properly ignore
yeah, thats the idea
the layer the collider is on is the important layer
so you have effectively done nothing
yeah, but i modifie the rigid layer
for make them dont touch
wich would make them, dont CRASH
and this is good. My issue is, if this might give me trouble in the future
or nah
The only reason they're not crashing is because one of your colliders is a trigger
a h
i should have forgot
wait what, where?
now im checking and im not finding it
i have no idea, presumably on one of the colliders
You haven't shown enough info here to make a full assessment of how things are set up
YOu said they are "triggering"
you need to explain what you mean by that - which I asked you a while ago
nop
if i touch the enemy, the playe gets hurt
that's simple
How does it work?
{
Vector2 MacheteRange = new Vector2(attackRange, attackRange);
Collider2D hitEnemy = Physics2D.OverlapBox(machetepos.transform.position, MacheteRange, 0f, valeria);
if (hitEnemy != null)
{
if (hitEnemy.TryGetComponent(out ValeriaController enemy))
{
enemy.TakeDamage(meleeDamage);
proximoAtaque = Time.time + cooldownAtaque; // Se establece el cooldown para el próximo ataque
}
}
}```
first i did the player's meele using overlapping, and due thats was the only way i knew how to do it, i also did the enemy do that aswell
ok see you're doing this manually
:3 clever or idiotic?
that's why it's not affected
i dont get it
Physics2D.OverlapBox is not related to any Rigidbody
i know...
it doesn't know or care about your rigidbody layer ignoring
aaaaaaaaaaaaaaaaaaaaaa
ofc
so this mean if i make it need it
im fuck'd
unless i check the trigger button
IDK what you mean by that
they dont hurt each other
that i mean
in other words, now i get how this works
thanks
This is one way to do this.
Another way would be to have a second collider which is a trigger
on a separate layer
yes
good