In this tutorial we go over aligning the player to the ground or the surface which they are standing on. This will allow the player to climb up slopes more easily if they have a dynamic physics set. This can be used in various contexts and was used for my BGMC 14 entry.
Likes comments and shares are greatly appreciated!
Subscribe for more!
help thread: http://blenderartists.org/forum/showt...
BluePrintRandom's Channel: / @jacobmerrill
Script:
#############
import bge
from mathutils import Vector
cont = bge.logic.getCurrentController()
own = cont.owner
Ray = cont.sensors['Ray']
if Ray.positive:
own.alignAxisToVect(Vector(Ray.hitNormal)*1,2,.24)
else:
own.alignAxisToVect(Vector([0,0,1]),2,.25)
#############
Script file: https://drive.google.com/file/d/0B_DS...
Stay Inspired!