Game Development Community

Shouldn't setAutoRotation() work with 3d objects?

by Steve George · in Torque Game Builder · 04/04/2006 (12:17 pm) · 3 replies

I am assuming that once a 3D object is created, I should be able to call standard sprite functions on it. The reason I want to use the sprite version is so both are compatible with game specific functions I create. It seems that setAutoRotation() won't rotate the 3d object window(surface).

Is this making sense or do I sound completely off my rocker.


Also: T2D renders the 3d object to a surface and treats it like a sprite, correct?

Steve

#1
04/04/2006 (1:14 pm)
No it displays the 3D model (all is 3d in reality, just projected like it was 2D), thus 3DShape ;-)
#2
04/04/2006 (8:28 pm)
Once you've created the t2dShape3D shape, you can then set it to automatically rotate via the setShapeAngularVelocity( "30 60 90" ) command; where the numbers are in degrees per second for each axis.
#3
04/05/2006 (8:32 pm)
I do understand that the 3dshape has its own functions and "Yes" they do work. It's just that I'm interested in abstracting the idea of sprites and 3dshapes. I want to be able to toss either at the engine and not have to write differant functions for each case. Here's an example: I switched my code to use setShapeAngularVelocity()..The particles that were origionally attached to a sprite(before i switched to 3d object) seemed to function fine until I rotated the 3dobject. Since it's only rotating the geometry and not the underlying surface(window..or whatever the correct name is), the particles do not transform with the shape. Hench my original desire to use the standard setAutoRotation() function.

Thanks for chiming in though!