forked from bartvdbraak/blender
BGE bugfix, ipo actuator's foce option didnt check that the object was dynamic.
This commit is contained in:
parent
d566765635
commit
6cccdf0cb2
@ -1857,7 +1857,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh
|
||||
but = uiDefButBitS(block, TOG, ACT_IPOFORCE, ACT_IPOFORCE,
|
||||
"Force", xco+10+(width-20)/2, yco-24, (width-20)/4-10, 19,
|
||||
&ia->flag, 0, 0, 0, 0,
|
||||
"Convert Ipo to force. Force is applied in global or local coordinate according to Local flag");
|
||||
"Apply Ipo as a global or local force depending on the local option (dynamic objects only)");
|
||||
uiButSetFunc(but, change_ipo_actuator, but, ia);
|
||||
|
||||
but = uiDefButBitS(block, TOG, ACT_IPOADD, ACT_IPOADD,
|
||||
|
@ -143,7 +143,7 @@ bool KX_IpoSGController::Update(double currentTime)
|
||||
{
|
||||
if (m_ipo_as_force == true)
|
||||
{
|
||||
if (m_game_object && ob)
|
||||
if (m_game_object && ob && m_game_object->GetPhysicsController())
|
||||
{
|
||||
m_game_object->GetPhysicsController()->ApplyForce(m_ipo_local ?
|
||||
ob->GetWorldOrientation() * m_ipo_xform.GetPosition() :
|
||||
|
Loading…
Reference in New Issue
Block a user