Ok! So what I am trying to do is to get the yellow tetrahedron to move around the planet so that the z axis of the tetrahedron is always aligned to the normal “force” that the planet pushes on to the tetrahedron. What it does now is slides around with correct planetary gravity though the tetrahedron isn’t always oriented correctly. Also how do I stop it from sliding when I move the tetrahedron. Any ideas?
Controls:
R - forward
F - backward
WASD - move camera
RMB - rotate camera
and add a script for the player with a sensors always true
this scipt:
from bge import logic
cont=logic.getCurrentController()
own=cont.owner
obs=logic.getCurrentScene().objects
for i in obs:
if "world" in i:
ray=own.rayCast(i,own,5,"world")
if ray:
own.alignAxisToVect(ray[1],2,0.1)