hello, I have an issue with the colliders. When I position the player to be level with the ground, and then click on play, the player moves up a bit and floats. I have done everything with adjusting colliders. When I do that the player only stays in position while staying still but when moving it raises up a bit again. The pictures attached shows before play and after. (sorry if the explanation doesn't make sense)
#colliders
1 messages · Page 1 of 1 (latest)
can I see the floor's collider from a similar angle? And can you put your player movement scrip there
from the 2d perspective
I have tested the same exact script I have made before and it worked fine
so basically reused the script
and it worked fine there
well then 🤷♂️
but why does it not work here?
no idea, haven't seen your code
you said only when you move the player
no, what I meant is: when I drag the player below the surface a bit
I'm confused, sorry
1 sec I'll record a clip
sorry the clip is a bit laggy
oops let me convert it rq
after I drag it down a bit and hit play
@queen arrow
oh you have a character controller on it
that's its skin width probably
there's a way to view the skin width i forgot how since i never use the component
I think you can make the skin not collider with certain layers in the layer overrides section, just put the ground on a layer that doesn't collide with the skin.
ok I will try that now
btw I have tried minimizing the skin width but it didn't work
it could also be the height
not sure.
in the skin width try typing 0.5 * 0.1 and try that setting
but idk character controllers so
okay
still doesn't work
wait it worked
I typed in 0.01
thanks
@queen arrow
:)
idk if you want it to be that small
Docs recommend 10%
That’s 2%
Could cause other problems
Best move is to separate character controller and player model so player model is child of gameobject with character controller
Then just nudge the child object down to hit the ground in edit mode
okay will try now
still the same
what do you mean
same issue
then you didnt nudge the player model down enough
just did and then it still does it
your character controller is on a parent object, and the model, only the model, is on the child object?
because it wouldn't
I have the controller and scripts on the parent
then you just need to move the model down on the y axis and it won't do that
is -0.5 enough?
idk
@queen arrowI tried it and it worked BUT the function that makes the player jump doesn't work with it