Hi
It seems there are some bug with LoadObjectWithChildren() and SetObjectScale(), with an animated model in *.dae.
1) LoadObjectWithChildren() and SetObjectScale()
With SetObjectScale(), the model is very deformed :
With SetObjectScalePermanent(), the model is normal, but I can't use instanceObject()/CloneObject() with LoadObjectWithChildren() :
2) LoadObjectWithChildren() doesn't work with : InstanceObject() or cloneObject()
If I try to clone/instance an object, the cloned/instancied object doesn't appear if I use : LoadObjectWithChildren() and SetObjectScalePermanent().
LoadObjectWithChildren(1,file$)
SetObjectScalePermanent(1,10,10,10)
PlayObjectAnimation(1, "", 0, 2, 1, 0)
InstanceObject(2,1) // doesn't work (object doesn't appears
CloneObject(2,1) // doesn't work (object doesn't appears
Code example :
SetWindowTitle( "3D_animatedmodel" )
SetWindowSize( 1024, 614, 0 )
SetClearColor(100,100,100)
SetVirtualResolution( 1024, 614 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetCameraLookat(1,0,0,0)
r = 10
LoadObjectWithChildren(1,"animatedmodel.dae")
PlayObjectAnimation( 1, "", 0, 2, 1, 0 )
//SetObjectScale(1,r,r,r) // bug with animation and LoadObjectWithChildren(1,"gloob.dae")
SetObjectScalePermanent(1,r,r,r)
CloneObject(2,1)
// SetObjectScalePermanent(2,r,r,r) // doesn't with or without this uncommented
SetObjectPosition(2,-6*r,0,-6*r)
CloneObject(3,1)
// SetObjectScalePermanent(3,5,5,5)// doesn't with or without this uncommented
SetObjectPosition(3,6*r,0,6*r)
Do
Sync()
Loop
AGK2 tier1 - http://www.dracaena-studio.com