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 / How do i get the width/height/depth of an object (Model)

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Jul 2017 00:19
I have models that can tile and i would like to be able to get the width and move the tiles so they are side by side
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 8th Jul 2017 00:40
It's a bit convoluted, but look up the GetObjectSizeMinX() and GetObjectSizeMaxX() (the same for y and z) commands in the help.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Jul 2017 01:08
Thanks !
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 10th Jul 2017 00:32 Edited at: 12th Jul 2017 21:43
If you scale the objects GetObjectSizeMin and Max do not bring back the displayed size, it only brings back the size that was loaded in. The Mesh version does not work, either. I have also been unable to locate any AppGameKit commands that will return the scale of any object. In addition, these will only return the X size relative to the object. Not the world. So if your object is rotated 90 degrees it will not return your world Z axis size, which is what we probably need to know if we want to find intersections(raycast commands do not work on scaled objects).
I have had to create invisible plane objects stored in arrays , and set up collision detection on those objects. Pretty cumbersome, imo.

Login to post a reply

Server time is: 2024-09-30 05:36:38
Your offset time is: 2024-09-30 05:36:38