Several possible solutions -
Set your character’s rigidbody to use gravity.
Set your character’s to not be isKinematic.
Remove the line(s) in the script(s) that is(are) applying incorrect forces/movement to the character.
hey, hi, i can not use gravity, because the gravity should go to direction on the feet of my character. Remember than i am creating a deform planet with a raycast (ray) than returns the “normal” vector of hit zone.
i am sure than uncheck the “isKinematic” property.
i am using one force, it is the gravity for deform planet.
If your planet doesn’t have a single center point then you need to represent its “spine” with a spline and find the closest spline point to the player, then pretend that point is the planet center and still use that same equation. There are some very nice spline examples in the forum here (search for B-Spline or Bezier Curves), and Google returns plenty of hits for “closest point on a spline”
How irregular are they? Even if they’re roughly spherical tha force to an approximate centre will stick you to it. If you want to align to the bumpy surface get the hit.normal from the collider.
For a cylinder, you use a line that represents its center and draw the character towards the nearest point on that line. Don’t let them escape. Always draw them towards the nearest point on the line. If they’re able to pick up enough speed to leave the planet then you need to increase the gravity force until they can no longer escape.