Game Development Community

Issue w/ Offset & 3D Objects

by Nathan Huffman · in Torque Game Builder · 12/04/2006 (7:02 am) · 5 replies

When trying to give my 3D object a X-axis offset, works fine.

When trying to give me 3D object a Y-axis offset, it has no effect, or causes my model to lose certain bodyparts (not displaying).

TGB 1.1.3

Any suggestions? Bug?

#1
12/07/2006 (6:49 pm)
I think I had similar issues with big shapes getting cut off even without offsets as if they need to be placed a certain way in the modeler. I read in the 3d shapes tdn article or somewhere else something similar that you have to be careful about animations that extend out into 3d space because the viewport will clip them off.

One suggestion that you can play with in the editor while your object is selected, on the edit tab, 3d shape section, is the scale. Reduce x,y, and z to something like 0.75. Then to get back the size of the object you may need to re-adjust scale in the sceneobject section of the editor.

Does that make sense? Try it out.
John
#2
12/07/2006 (7:02 pm)
> When trying to give me 3D object a Y-axis offset, it has no effect, or causes my model to lose certain bodyparts (not displaying).

Although TGB renders 3D objects orthographically, there are still clipping planes involved. I believe the object is moved by setShapeOffset() after the projection, therefore it's probably possible to go beyond the camera clipping planes. If a movement in Y causes the model to "lose parts", it's probably because you're moving it "in-and-out" of the screen, and because the projection is orthographic you won't notice any visible change until you hit a clipping plane. What happens when you move in Z?

- Matthew Durante
#3
12/08/2006 (6:09 am)
Thanks for the responces, but I think my post was misunderstood.

I'm not asking about animations going "outside the box", thus disappearing. I'm talking about where in the box you center the 3d object. You can set an offset.

When I set an X offset of, say 30, the 3d object will appear "slightly to the right" of the "center of the box". So if my 3d object had a lot of "foward" (or "right") facing animations, I could set an offset of -100 and it's appear on the left side of my box so the actual 3d model has all the room to the right to animate.

The error I'm asking about is when you attempt to set a Y offset. Make the 3d object higher/lower in "it's box" compared to the center.

Does this make sense? If not, I'll try to take screenshots. Y-axis offset isn't working a/o 1.1.3

edit: Therefore, a Y offset of 0 or a Y offset of 10, 15... 100... whatever... makes no difference in the location of the object inside it's "box"/"clipping plane". Other than, what seems like randomly, parts of the model will disappear (and I'm not talking about moving it out of it's clipping plane, its dead center... still (even tho I'm trying to change that)).
#4
12/08/2006 (10:28 am)
I was adjusting y offset last night and my model would adjust lower/higher so it seemed like it was working for me - version 1.1.3.

As for 'parts' of a model disappearing, does any of the suggestions above do anything, such as my scale suggestion or Matthew's Z axis suggestion?

Otherwise, pics will help.
John
#5
12/08/2006 (10:51 am)
Hey guys,

Nothing happens for me with Y or Z. Only X. I'll post up if I find out why this is happening for me. thanks for your time.