playMaker

Author Topic: Does anyone know how to find the size of a game object?  (Read 2245 times)

upOwlNight

  • Playmaker Newbie
  • *
  • Posts: 27
Does anyone know how to find the size of a game object?
« on: January 29, 2016, 02:54:07 PM »
Is this possible to do in playmaker? I've read a lot of stuff talking about finding bounds or extents, but my mesh render properties have no such option.

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Does anyone know how to find the size of a game object?
« Reply #1 on: January 29, 2016, 04:43:20 PM »
you mean like get scale?

edit: nevermind, I see what you mean...
I don't know but am also curious now
« Last Edit: January 29, 2016, 04:45:21 PM by terri »

upOwlNight

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Does anyone know how to find the size of a game object?
« Reply #2 on: January 29, 2016, 09:26:06 PM »
yea, just to clarify, for anyone else wondering what I meant:

I want to know the height and width of a rectangular game object specifically. Not it's scale, but how many units it takes up in space.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Does anyone know how to find the size of a game object?
« Reply #3 on: January 30, 2016, 12:25:41 AM »
Just a quick thought for the height-

If you get the bounds of the colliders on the object you know where the mesh/object ends-

If the axis of the game object you want to get the height of is at the bottom of the object and not the middle- then you can just create a null as many units on the Y as the height the collider bounds gives you-

-then get the distance between the new null and the game object- that will give you the height in units-

Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

upOwlNight

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Does anyone know how to find the size of a game object?
« Reply #4 on: January 30, 2016, 03:36:46 AM »
thanks for the reply. Two questions: 
Which property has the "bounds" of the collider? 
Is this an efficient way of doing it? 
I ask the second question because so many time I come up with a solution for something, and I feel like "should I really be doing this? is this what someone with experience would do? is this going to slow my game down?" 
 
being self taught with just knowing some actions, to me, I feel like a student of the english language who knows vocabulary, but no grammar.