I never used the 3d commands in AppGameKit before. Can anyone explain why Object2 doesn't move with Object1?
// Includes
#include "template.h"
// Namespace
using namespace AGK;
app App;
int iObject1;
int iObject2;
void app::Begin(void)
{
agk::SetVirtualResolution (1024, 768);
agk::SetClearColor( 151,170,204 ); // light blue
agk::SetSyncRate(60,0);
agk::SetScissor(0,0,0,0);
iObject1 = agk::CreateObjectBox(5, 10, 10);
iObject2 = agk::CreateObjectBox(10, 5, 10);
// agk::FixObjectToObject(iObject2, iObject1); // This works
agk::FixObjectToBone(iObject2, iObject1, 1); // Why doesn't this work?
agk::SetObjectBonePosition(iObject1, 1, 0, 0, 0);
}
int app::Loop (void)
{
// Why does Object2 not move with Object1?
agk::MoveObjectLocalX(iObject1, 0.1f);
agk::Print( agk::ScreenFPS() );
agk::Sync();
return 0; // return 1 to close app
}
void app::End (void)
{
}