#weird collider problem top down 2d
1 messages ยท Page 1 of 1 (latest)
u would just not call it..
or set its position to itself.. (which would probably act the same way)
but when i let go it starts sliding
if(giving input) -> rb.movepos else -> //blank
really?
do u not have any friction
when not moving it should come to a stop on its own.
i have friction i think its because of some messy code
well i say friction.. but i meant drag..
i have it so the player only moves after a small buffer time where the player has to hold down the key to actually move
drag should slow it down to a stop
oh
ahh, yea i think ur code could be improved.. and why ur having some of these issues..
i dont work in 2D to be fair.
i changed the drag from 0 to 0.05 and it works fine
but 3D is similar enough..
the stopping i mean
i must have accidentally set it to 0 at some point lol
so.. now if ur not calling rb.moveposition (it shuld come to a rest by itself)
unless being pushed by the enemy or w/.e
the enemy does this weird thing
the objects colide and the enemy stops for a sec and then phases through the collider, but not all the way thru
it phases mostly through, but then actually starts pushing it as normal
weird collider problem top down 2d
yeah i tried it with both but it didnt work
i have no idea what to do
wait
wait wait wait wait
i think i know
it might be the single dumbest thing ever
oh my god i was right
what the actual heck
my invincibility coroutine was copied from another game
and in that game i wanted the character to move through its enemies
so i had the couroutine ignore layer collisions while it was active so that the enemy didn't deal damage while the player was invincible
and it worked on this project too and thats the ENTIRE reason the enemy wasn't colliding properly
it wasnt the rb.velocity, it wasnt continuous vs discrete or any of that ๐ญ