#colliders

1 messages · Page 1 of 1 (latest)

warped kernel
#

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)

queen arrow
warped kernel
#

from the 2d perspective

warped kernel
#

so basically reused the script

#

and it worked fine there

queen arrow
#

well then 🤷‍♂️

warped kernel
#

but why does it not work here?

queen arrow
#

no idea, haven't seen your code

warped kernel
#

it does it even without code

#

I don't have to use the scripts

queen arrow
#

you said only when you move the player

warped kernel
#

no, what I meant is: when I drag the player below the surface a bit

queen arrow
#

I'm confused, sorry

warped kernel
#

1 sec I'll record a clip

warped kernel
#

sorry the clip is a bit laggy

#

oops let me convert it rq

#

@queen arrow

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.

warped kernel
#

ok I will try that now

#

btw I have tried minimizing the skin width but it didn't work

queen arrow
#

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

warped kernel
#

okay

#

still doesn't work

#

wait it worked

#

I typed in 0.01

#

thanks

#

@queen arrow

#

:)

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

warped kernel
#

okay will try now

queen arrow
#

what do you mean

warped kernel
#

same issue

queen arrow
#

then you didnt nudge the player model down enough

warped kernel
#

just did and then it still does it

queen arrow
#

your character controller is on a parent object, and the model, only the model, is on the child object?

#

because it wouldn't

warped kernel
#

I have the controller and scripts on the parent

queen arrow
#

then you just need to move the model down on the y axis and it won't do that

warped kernel
#

is -0.5 enough?

queen arrow
#

idk

warped kernel
#

tried everything nothing worked except for putting it to 0.01

#

the skin width

warped kernel
#

@queen arrowI tried it and it worked BUT the function that makes the player jump doesn't work with it

warped kernel
#

update: I tried logging the bool if the player is grounded from the bool I have assigned to check if the isgrounded, jump

#

and when I checked the logs it says true even tho I can't jump