Components

Components are pre-definied behaviours that can be further customized with Python. You can find the python scripts at the core/com directory.

Control

class control.ThirdPerson

Third Person controls. WASD to move and space to jump (with inhertia).

move_speed

The movement on the WS.

turn_speed

The movement on the AD.

jump_force

The movement on the SPACE, more ticks will take more to jump.

jump_ticks

Logic thicks that takes to a full impulse to be applied. Gives the illusion that pressing a key harder you can jump heighter.

class control.MouseLook

Mouselook to be used with a camera.

You can control the camera orientation with the mouse and move arround with WASD.

sensitivity

The sensitivity of the mouse. Default: 0.75

deathzone

The amount of mouse movement that will be considered noise. Default: 0.002

invertx, inverty

Mouse invert, 1 or -1

speedx

The speed of movement on the x axis. (Left/Right) Default: 0.1

speedz

The speed of movement on the z axis. (Front/Back) Default: 0.3

angle

It can be used to ensure a maixum rotation on the x axis, so avoiding an inverted view. Smaller than 0, no limit will be applied, otherwise a float representing the angle in radiants (for one direction) will be used. Default: 1

continuous

If true the mouse won’t be setted to the (0.5, 0.5) position.

class control.Follow

Follow another object

target

Object to follow

Type:KX_GameObject
speed
class control.TrackToNearest

Track to nearest object with a given property

property

Only lock for objects with this property, if empty, look for all objects in the scene.

distance

Maxium distance to lock for objects. If 0, no maxium distance.

lock

Makes the it so that the object only rotates on the Z axis.

class control.View3D

Navigate just like in Blender, to be used with a camera.

Media

class media.Music

Play a long audio file

File

The filepath to to the file to play. Relative to the project folder. (Python: path, audiofile)

Volume, Loop
Fade In

The amount of time in seconds for the fade in effect. (Python: fade)

class media.MusicFolder

Continuously play random music from a folder

Folder

The filepath to to the folder to play. Relative to the project folder. (Python: path, audiofile)

Volume
Fade

The amount of time in seconds for the (fade out -> wait -> fade in) effect during song transitions. (Python: fade)

Type:set(3)
class media.Video

Play a video file with sound

File

The filepath to to the file to play. Relative to the project folder. (Python: path, videofile)

Volume