#Can somebody help me with collision

1 messages · Page 1 of 1 (latest)

steady locust
#

So i'm working on a topdown shooter and for some reason when i move the player into a wall the player just kinda fases through it. Any help would be appretiated

steady locust
#

yes

dusk notch
#

Is the speed way too fast for the engine to calculate physics?

steady locust
#

hmm let me check

#

no

gentle bay
#

MovePosition can sometimes phase through walls/teleport. velocity will consider obstacles more
#old_programming message

outside of that, I also suggest to check your physics setup. are the obstacle and the player layers set to collide in your collision mask? do you use the right components (rigidbody and collider for 3d, collider2d and rigidbody2d for 2d)

steady locust
#

i've checked the collision masks and everything is alright there

#

and i've tried to use velocity but the player just stands in place

#

it's frustrating

gentle bay
#

ah, is your rigidbody set to be kinematic?

#

if so, disable kinematic

#

or maybe the velocity is overwritten somewhere? or there is an unreasonable high drag value?

steady locust
#

set it to not be kinematic but naw it ain't moving

gentle bay
#

do you have freeze axis set?
can you recheckthe speed values?
also have you made sure that timeScale is > 0?

other than that I'm out of ideas

steady locust
#

well i did freeze the rotation maybe that might be the problem

gentle bay
#

shouldn't be an issue for the methods you use but if you have settings you haven't checked, i guess it's worth to try

steady locust
#

wait i just checked that my timescale is 1

#

@gentle bay