Dev:Ref/Release Notes/2.72/Game Development

提供: wiki
移動先: 案内検索

Game Engine

Evaluation types

New Property Sensor Evaluation Types

The Property Sensor has two new evaluation types: "Greater Than" and "Less Than".

For the entire description of new evaluation types please refer to the documentation.

Mouse Actuator set to Mouse Look mode

New Mouse Actuator

This actuator allows users to show/hide the mouse cursor using logic bricks, as well as control object rotation with a mouse in the BGE. The mouse rotation is flexible enough to allow any type of mouse look, as well as banking for flight controls.

Mouse Actuator set to Visibility mode

Edit Object actuator - Track to

New Track To Actuator menus

The Track To Actuator has two new menus: "Up Axis" and "Track Axis". These menus improve the tracking possibilities.

For the entire description of new menus please refer to the documentation.

Property Actuator - Level mode

New Level mode for Property Actuator

The Property Actuator has a new Level mode: Switches to 1 if the actuator is activated and back to 0 if the actuator is deactivated.

For the entire description of the Property Actuator please refer to the documentation.

Mouse Over Any Sensor - X-Ray mode

New X-Ray and Property/Material detection for Mouse Over Any Sensor

The Mouse Sensor has two new functions:

This field can be used to limit the sensor to look for only those objects with this property.
1) Unless the Property field is set, the Ray sensor can detect objects "through" other objects (walls etc).
2) Objects must have "Actor" enabled to be detected.
X-Ray Mode button
Makes it x-ray, so that it sees through objects that don’t have the property or material specified in the filter field.

New BGE Debug API

  • The new method showFramerate, showProfile, showProperties can used to enable or disable the debug display while the BGE is running.
  • If autoDebugList (default = true) is true, debug properties for new added objects will be displayed.
  • If clearDebugList is called all debug properties will be deleted from the debug display.
# At bge.render module
  • The method addDebugProperty adds a single property to the debug display.
KX_GameObject.addDebugProperty (name, debug = True)
  • The attribute debug adds all debug properties from the object.
  • The attribute debugRecursive adds all debug properties from the object and dis children's.
.. attribute:: debug
.. attribute:: debugRecursive

New Constraint Wrapper API

  • New constraint attribute to get the constraint type (read only).
.. attribute:: constraint_type

Compatibility Issues


The applyImpulse() function was amended to match the behavior described in the documentation. Additionally a local/global flag was added to the function. Now, we have the following:

applyImpulse(point, impulse, local = False)

being "point" the point to apply the impulse to (in world or local coordinates). Then if local flag is set to False we will have to introduce both point and impulse in World space coordinates and if local flag is set to True we will have to introduce both point and impulse in local space coordinates.

NOTE: This update changes the old behaviour. To update the scripts to match the same old behaviour it will be necessary to do the following:

old script:

own.applyImpulse(Vector((0,0,0)), Vector((0,0,2)))

new script:

own.applyImpulse(own.worldPosition, Vector((0,0,2)))