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.

AppGameKit Classic Chat / GetObjectMinY() & GetObjectMaxY() bug

Author
Message
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 5th Jan 2019 13:35
I would like to report this bug. The Y-size functions for an object do not work
fubarpk
Moderator
14
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 5th Jan 2019 17:14
Some example code might help but they worked perfectly for me when I tried
to get the size y of an object "GetObjectSizeMaxY( objID ) -GetObjectSizeMinY( objID )"
returns the y size (note there is a minus sign)

if its a mesh "GetObjectMeshSizeMaxY( objID, meshIndex ) - GetObjectMeshSizeMinY( objID, meshIndex )"
where meshIndex - The index of the mesh to check.
fubar
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 5th Jan 2019 18:38
Quote: "if its a mesh "GetObjectMeshSizeMaxY( objID, meshIndex ) - GetObjectMeshSizeMinY( objID, meshIndex )" where meshIndex - The index of the mesh to check."

You are right, but the functiona GetObjectSizeMaxY( objID ) & GetObjectSizeMinY( objID ) need to be fixed
fubarpk
Moderator
14
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 5th Jan 2019 18:59 Edited at: 5th Jan 2019 19:03
getObjectSizeMaxY does not return max y size its not meant to
this is how you get it
result#=GetObjectSizeMaxY( objID ) -GetObjectSizeMinY( objID )

because GetObjectSizeMaxY( objID ) returns the highest location a vertex is located on your object
the name is misleading
fubar
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 5th Jan 2019 20:01
From the documentation
Note that the object may be off center so its min value may be 10 whilst its max value is 12, meaning its size is 2 units in the Y direction

Login to post a reply

Server time is: 2019-06-19 11:04:44
Your offset time is: 2019-06-19 11:04:44