Hi
I don't know if it's a bug, but when I try to use cloneObject() with a .dae, sometimes the game crash, sometimes i have the message :
"Error: Failed to Create XAudio2 Mastering Voice from DLL in main.agc at line 45".
The line 45 is :
The error depend on my dae file ^^. If I use complexe mesh (character for example), it crash, not if I use a simple export mesh (cube or plane).
Code example :
// Project: 3D_bug_sprite
// Created: 2016-02-25
// set window properties
SetWindowTitle( "3D_bug" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetGlobal3DDepth(200)
SetGenerateMipmaps(1)
SetAntiAliasMode(1)
SetScissor(0,0,0,0)
/*
SetSkyBoxVisible( 1 )
SetFogMode( 1 )
SetFogColor( 161,183,209 )
SetFogRange( 50, 700 )
SetFogSunColor( 255,230,179 )
SetSkyBoxSkyColor( 161,183,209 )
*/
SetCameraFOV(1,28)
SetCameraPosition(1,0,3.4,0)
MoveCameraLocalZ(1,-30)
// a grey sprite
CreateSprite(1,0)
SetSpriteSize(1,1024,768)
SetSpriteColor(1,120,120,120,255)
FixSpriteToScreen(1,1)
SetSpriteDepth(1,2500)
LoadObject(1,"object.dae")
SetObjectRotation(1,0,45,0)
CloneObject(2,1)
do
Print( ScreenFPS() )
Sync()
loop
If I use InstanceObject(), I haven't the crash.
@Paul : if needed, I can send to you my dae file that are causing the crash.
AGK2 tier1 - http://www.dracaena-studio.com