テンプレート:Release Notes/2.46/Game Engine

提供: wiki
< テンプレート:Release Notes‎ | 2.46
2018年6月29日 (金) 02:54時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

Delta Loc/Rot/Scale Ipo

Delta Loc/Rot/Scale Ipo curve are now supporting in the BGE with the following limitations:

1. All Ipo channels are now independent. In Blender 2.45, all 3 Loc Ipo channels were automatically set together. For example, having just a LocX Ipo channel was sufficient to fix the X, Y and Z coordinates, with the Y and Z value taken from the object original Y and Z location in Blender. The same was true for the 3 Rot and the 3 Scale Ipo channels: the missing channels were assumed to have constant value taken from the object original orientation/scale in Blender. With this patch, all Ipo channels are now independent. THIS WILL CREATE BACKWARD COMPATIBILITY PROBLEM if you omit to define the 3 channels of a same type together in your Blend file: the undefined Loc, Rot, Scale coordinates of the object will be influenced by the parent/spawner Loc/Rot/Scale in case the object is a child or dynamically created.

2. Delta Loc, Rot, Scale are now supported with the following limitations:

 The delta Loc/Rot Ipo modify the object global (NOT local)

location/orientation

 The delta Scale change the object local scale
 The delta Ipo curves are relative to the object starting

Loc/Rot/Scale when the Ipo was first activated; after that, the delta Ipo becomes global. This means that the object will return to this initial Loc/Rot/Scale when you later restart the Ipo curve, even if you had changed the object Loc/Rot/Scale in the meantime. Of course this applies only to the specific Loc/Rot/Scale coordinate that are defined in the Ipo channels as the channels are now independent.

3. When the objects are converted from Blender to the BGE, the delta Loc/Rot/Scale that might result from initial non-zero values in delta Ipo Curves will be ignored. However, as soon as the delta Ipo curve is activated, the non-zero values will be taken into account and the object will jump to the same Loc/Rot/Scale situation as in Blender. Note that delta Ipo curves with initial non-zero values is bad practice; logically, a delta Ipo curver should always start from 0.

4. If you define both a global and delta channel of the same type (LocX and DLocX), the result will be a global channel equivalent to the sum of the two channels (LocX+DLocX).

rayCastTo

New rayCastTo() python method for KX_GameObject:

rayCastTo(other,dist,prop)

Look towards another point/KX_GameObject and return first object hit within dist with a property that match prop, None if no object found or if it does not match prop.

Parameters:

 other = 3-tuple (xyz coordinates) or object reference (target=center of object)
         (type = list [x,y,z] or object reference)
 dist = max distance of detection (can be negative => look behind)
        If 0 or omitted => detect up to other

(type=float)

 prop = property name that object must have
        If empty or omitted => detect any object
        (type=string)


speedups

This patch modifies the BL_ConvertMesh method from the data conversion module in order to reduce the number of polygon material objects that are created.

Normally, there should be only one material object for each material bucket(the group of meshes that are rendered together with a single material). However, the number of materials that are created right now in the converter is much higher and eats a lot of memory in scenes with large polygon counts. This patch deletes those material objects(KX_BlenderMaterial) that are used only temporarily in the converter(and are now deleted only when the converter is destroyed, at the end of the game).

For a cube that's subdivided 7 times(90+ k polygons) I get 200 MB usage in the game engine in 2.45 and 44 MB with a svn build with this patch applied if the "Use Blender Materials" option is activated in the Game menu.


Mesh replacement in BGE will react properly to armature deform

Changing the mesh of an object that has a deform controller (armature) is now properly handled. The new mesh must have vertex groups matching the armature bones. In simple terms, the new mesh must deform correctly when you assign it to the object in Blender and you test the action. It will deform the same when you replace the object mesh during the game.


enable negative axis radar sensor

enable negative axis radar sensor


Realtime SetParent function in the BGE

This patch consists in new KX_GameObject::SetParent() and KX_GameObject::RemoveParent() functions to create and destroy parent relation during game. These functions are accessible through python and through a new actuator KX_ParentActuator. Function documentation in PyDoc. The object keeps its orientation, position and scale when it is parented but will further rotate, move and scale with its parent from that point on. When the parent relation is broken, the object keeps the orientation, position and scale it had at that time. The function has no effect if any of the X/Y/Z scale of the object or its new parent are below Epsilon.

ESCKey

ESC now quits the game by default in all modes unless a keyboard sensor is set on ESC. In this case, the game designer must arrange for an alternative way to quit the game.

getLinearVelocity

getLinearVelocity() now can provide local velocity as well.

Patches

Patches 8235 8218 8211 added: various gameengine improvements, fixed windows project files