Game Development Community

How to get the size of an object?

by Liu Yi · in Torque Game Engine · 12/19/2006 (1:17 am) · 2 replies

How to get the size of an object in the x, y, z directions? The object is a StaticShape.

I didn't manage to find an existing console method to do this.

#1
12/19/2006 (1:30 am)
I figured out that i can use getObjectBox() method.

Here's another question: when i use getPosition() method, what I get is always the position of a point at the bottom centre of the object. Is there anyway that i can get a specific point of the object.

For example, when i use %gun->getPosition(), i hope to get the position of the muzzle point of the gun, instead of a point at the bottom of the gun.
#2
12/19/2006 (5:07 am)
If the muzzle point is a node that was exported with the object from the 3D modeling program, you can get the transform of the node (muzzlePoint, mountPoint, ect). That might help.