Armature Function

The Parent to bone relationship now works realtime allowing for simple collision shells on armature deformed characters and simple setup of robotic style limbs/systems.

 

New Armature hooks allow Edit Object>Replace mesh actuators to work on deformed meshs, This means character meshs can be swapped allowing for changeable clothing, different meshs for different damage levels, LOD etc.

Sensor: Joystick

Possible values for Joystick Hats are (clockwise from the Top) 1,3,2,6,4,12,8,9

New Joystick Sensor adds support for 4 axis (dual stick), 18 buttons and 2 directional hats. Logic bricks are by nature digital therefor analogue joystick access can only be achieved via python, this uses sen.getAxisValue() which returns a list of 4 variables [00,01,10,11] (stick,axis)

 

Sensors set to read from a Hat use a bitmask for the Direction value.

Hat Directions

1 = Up

2 = Right

4 = Down

8 = Left

(for diagonals, add the component values, i.e. Up+Left = 1+8 = 9)

Material: Z offset

The depth (from camera) of a poly can be artificially shortened slightly using zoffs in materials, this is helpful for forcing one mesh to the front when there are two surfaces at a similar or identical location.

Python: getDistanceTo

Simple method for getting the distance between the owner object and a named target.

e.g. (where the target object is called 'Name')

import GameLogic

own = GameLogic.getCurrentController().getOwner()

Target = GameLogic.getCurrentScene().getObjectList()["OBName"]

print own.getDistanceTo(Target)

 

 

Code by Kester Maddock. Release log: OOPz