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++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, 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
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
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++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, 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
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
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
Moderator
11
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: 2024-11-05 18:50:11
Your offset time is: 2024-11-05 18:50:11