Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / dbScaleObject not changing the size?

Author
Message
manu
16
Years of Service
User Offline
Joined: 7th Jun 2008
Location:
Posted: 15th Jun 2008 00:33
Could someone please explain the following to me:

I scale an object by 5%,8000%,5%. After that dbObjectSizeX, dbObjectSizeY and dbObjectSizeZ all return 9. How can that be?
Doesnt scale change the actual size?
tobi453
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 15th Jun 2008 01:00
Use dbObjectSizeX(3,1), dbObjectSizeY(3,1) and dbObjectSizeZ(3,1);

FINAL VERSION RELEASED!!!!
manu
16
Years of Service
User Offline
Joined: 7th Jun 2008
Location:
Posted: 15th Jun 2008 02:43 Edited at: 15th Jun 2008 12:31
that doesnt work
error C2660: 'dbObjectSizeX' : function does not take 2 arguments

To clarify this. After dbScaleObject ( 3, 5, 8000, 5 ); the object looks very long on screen. But
dbObjectSizeX(3);
dbObjectSizeY(3);
dbObjectSizeZ(3);
all return 9.



Edit: solved. See http://forum.thegamecreators.com/?m=forum_view&t=124372&b=22
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 16th Jun 2008 03:55 Edited at: 16th Jun 2008 04:00
There appears to be an error in DarkSDKBasic3D.h, which repeats the function prototypes for dbObjectSize, dbObjectSizeX, dbObjectSizeY and dbObjectSizeZ.

The first set of prototypes appear at line 115, the second set is at line 344. I am uncertain why dbObjectSize is repeated at all, DBPro has no overloads for that function, but...

...If you are brave, the overloaded functions are in the library, I checked. You could replace lines 345, 346 and 347 with these three lines, and use the flag, like tobi543 suggested:

float dbObjectSizeX ( int iID, int ActualSize);
float dbObjectSizeY ( int iID, int ActualSize );
float dbObjectSizeZ ( int iID, int ActualSize );

This is a popular problem today!
manu
16
Years of Service
User Offline
Joined: 7th Jun 2008
Location:
Posted: 16th Jun 2008 10:49
thanks jinzai, I didnt see they where defined twice. But I allready added them to the header file and it works.

Login to post a reply

Server time is: 2024-09-29 23:22:10
Your offset time is: 2024-09-29 23:22:10