Game Engine: Option to record static objects animation
This commit is contained in:
committed by
Campbell Barton
parent
964252cdda
commit
1831c930a5
@@ -435,6 +435,11 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
|
||||
shapeInfo->Release();
|
||||
|
||||
gameobj->SetPhysicsController(physicscontroller,isbulletdyna);
|
||||
|
||||
// record animation for dynamic objects
|
||||
if (isbulletdyna)
|
||||
gameobj->SetRecordAnimation(true);
|
||||
|
||||
// don't add automatically sensor object, they are added when a collision sensor is registered
|
||||
if (!isbulletsensor && objprop->m_in_active_layer)
|
||||
{
|
||||
@@ -493,6 +498,11 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
|
||||
gameobj->getClientInfo()->m_type =
|
||||
(isbulletsensor) ? ((isActor) ? KX_ClientObjectInfo::OBACTORSENSOR : KX_ClientObjectInfo::OBSENSOR) :
|
||||
(isActor) ? KX_ClientObjectInfo::ACTOR : KX_ClientObjectInfo::STATIC;
|
||||
|
||||
// should we record animation for this object?
|
||||
if (objprop->m_record_animation)
|
||||
gameobj->SetRecordAnimation(true);
|
||||
|
||||
// store materialname in auxinfo, needed for touchsensors
|
||||
if (meshobj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user