Game Development Community

T3DStaticTSRenderComponent - unexpected behaviour

by Mathias Kahl · in Torque X 3D · 01/03/2010 (3:38 pm) · 0 replies

Good evening!

Think I've think I encountered another bug. At least I don't understand this behaviour:

I load two DTS models via T3DTSRenderComponent, which looks like this:
bunkernetz.de/~vr/T3DTSRenderComponent.jpg

Now I just replace T3DTSRenderComponent with T3DStaticTSRenderComponent and I get that:

bunkernetz.de/~vr/T3DStaticTSRenderComponent.jpg
I only register two models, so I take it as a bug when in fact three are drawn.

The code (for adding each of the rock-like models):
TorqueObject torqueObject = new TorqueObject();
            torqueObject.Name = name;

            T3DSceneComponent sceneComponent = new T3DSceneComponent();
            sceneComponent.Position = pos;
            sceneComponent.Rotation = rot;
            sceneComponent.SceneGroup = torqueObject.Name;
            torqueObject.Components.AddComponent(sceneComponent);

            T3DStaticTSRenderComponent renderComponent = new T3DStaticTSRenderComponent();
            renderComponent.ShapeName = path;
            renderComponent.SceneGroupName = torqueObject.Name;
            torqueObject.Components.AddComponent(renderComponent);

            //T3DTSRenderComponent renderComponent = new T3DTSRenderComponent();
            //renderComponent.ShapeName = path;
            //renderComponent.SceneGroupName = torqueObject.Name;
            //torqueObject.Components.AddComponent(renderComponent);

            TorqueObjectDatabase.Instance.Register(torqueObject);

About the author

I'm a student of Computer Science (Freie Universität in Berlin, Germany). Currently I'm working on a multiplayer strategy/action game based on Torque X.