Game Development Community

Fish Tutorials

by Fucifer · in Torque Game Builder · 05/22/2006 (1:12 pm) · 4 replies

Outstanding job on the Fish Tutorial. They are great tutorials, easy to follow and step by step. I have adopt them to make a Helico game and FPS shooter game. I have only one question. The %this.setFlipX(false); is there one for dts shape. This one will only work with images. What I am try to do is I have bird fly under Helico and when they get the left or right side end to fly back correctly. So dts need to flip when get to the end. Thank again for outstand Tutorials.

#1
05/22/2006 (9:06 pm)
T2dShape3D objects have a special method called SetShapeRotation(x y z) that allows you to rotate the shape along any of the three axes. The X and Y axis are the same as normal 2D sprites, and the Z axis is "into" or "out of" your screen.

The values are degree based, so try something like %object.setShapeRotation(180 0 0); and play with it until you get the result you want.
#2
05/23/2006 (10:40 am)
Flip would be scaling by -1, wouldn't it?
Rotate does only rotate it, but not flip it ...
#3
05/23/2006 (11:18 am)
What I was getting at is that there really isn't a direct match--2d shape vs 3d shape. In the example problem he stated, he most likely just wants the 3dShape pointing in the direction of travel, and the setShapeRotation() (with a little experimentation to figure out what angle to use) should help out.
#4
05/25/2006 (2:14 pm)
Thank you very much Stephen.