Shape3d on path scaling?
by Jon Fernback · in Torque Game Builder · 03/18/2008 (9:30 am) · 2 replies
I'm encountering an odd issue with using t2dshape3D objects that are attached to a path. The shapes seem to be changing scale when moving from one node to another (almost like a zooming effect popping in and out, which is increasing the object size about 10-20%). It only seems to happen between a few nodes on the path. During the rest of the path the 3D shapes are rendering like normal.
This doesn't seem to happen for 2D sprites following the same path or for any of my 3D shapes not on a path. The default scale of the objects is 1.0, so its not something being copied wrong when the shape is attached to the path.
Has anyone else encountered this?
This doesn't seem to happen for 2D sprites following the same path or for any of my 3D shapes not on a path. The default scale of the objects is 1.0, so its not something being copied wrong when the shape is attached to the path.
Has anyone else encountered this?
About the author
#2
Use the t2dPath setOrient method:
01/15/2010 (12:26 pm)
Just for information, you can change orientation of a path-attached object even without modifying the source code.Use the t2dPath setOrient method:
setOrient(object, orient) Description: Sets the orientation for given object. Params: object: Object to modify path settings orient: Object orientation Return: No return value.
Torque 3D Owner Jon Fernback
To anyone else that has this issue. The problem was in t2dPath's script call for attachObject. It is automatically orienting the shape to match the path. Which in my case ended up stretching the objects bounds during diagonal moves.
To correct this I added another boolean parameter to attachObject for orientToPath, which is already in the t2dPath's attachObject function. It just wasn't exposed to script.