# Character clipping through planet's surface

Hello everyone, this is my first post in this forum. Also, this is the first time I have to ask something about BGE because I didnt find an answer in a forum, tutorial, manual, reference, etc… and couldnt work it out myself.

I’m experimenting with a planet with a custom gravity script, a very similar to the one in tutorials out there. The main difference is that this script also gives the planet and it’s inhabitants a rotation movement; and in the future, it will include a translation movement too. Now, the problem is that whenever the rotation is activated, the characters physics starts loosing stability and sooner or later clips through the planet’s surface. I’ve tried changing the collision bound form, the radius, the friction, and -I belive- every related value found in the physics and materials tab without a different result. The only thing that seems to influde this is the rotation speed, defined in the script as “rotacion = 0.0002”. Whenever this value is changed, the behavour of the character changes a lot, but in general, a lower value gives more stability. The largest value for rotation I was able to use without a chaotic result was 0.0005, and the lowest value tested was 0.0001. Also, when the physics substeps is set to 5, stability is improved, but only if rotation=0.0005.

Maybe a different rotation method can be used in this case, if someone can figure it out?

Any help or idea is most welcome, thanks!

Controls:

• Arrows --> movement
• Space --> jump (Z movement)
• Left Ctrl --> add -g force
• Left Shift --> add -g force --> you can use both shift and ctrl to reverse gravity (-2g)

### Attachments

Planeta3.zip (1.72 MB)

Why do you need this rotation? What does it accomplish?

Well, this is just an experiment. There is no actual game proyect yet, I’m just proving concept. That said, the objective of the experiment is to create a small planetary system, in wich every planet would have its own date and hour. Rotation and position of the planet would influde then the distance required to travel from one point to another, making time choosing a requisite.

This is something i am interested in as well are you planing on having the planets orbit a central sun or just have rotation?A game like this that you can mod would be great don’t you think?