Aligning Player to surface @ThaTimster
Aligning Player to surface  @ThaTimster
Uploaded July 2015 | Updated September 2026, 14 minutes ago
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: blenderartists.org/forum/showthread.php?358735-Aligning-the-player-to-the-ground&highlight=

BluePrintRandom's Channel: youtube.com/channel/UC9vHtotZmnu2j5XRZPA-WSg

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: drive.google.com/file/d/0B_DSg35urBhDbGd3Q0FDQ3Y3bk0/view?usp=sharing

Stay Inspired!
Aligning Player to surfaceProject AI part 6: Animation Fixes + muzzle flareProject FPS Playthrough + Download BGE gameHow to add LOD in the BGEHow to add RTS style Camera movement in BGEHow to align cameras in different scenesHow to change Animation Speed in BGEBattlefield 4 style lens flare in the blender game engine demo + Free .blend Download!Compound Physics in BGEMarble Expedition Devlog 3: Level 1!Project Assets: How to create flying banknotesThe Actuator Sensor
ThaTimster |

Aligning Player to surface

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER