Game Development Community

T3DInputComponent Not Getting Ticks

by Tony Pitman · in Torque X 3D · 11/13/2009 (6:36 pm) · 1 replies

I have created a 3D Gui template game. I am trying to create my player component. Here is my declaration:

[TorqueXmlSchemaType]
    public class PlayerComponent : T3DInputComponent, ITickObject {

I have overriden the _SetupInput and _UpdateInput methods as directed by John K's torque book. I set break points in the code and these methods are being called which implies that I am registering the object and have everything it needs (things like scenegroupname, etc) all correct.

I stepped through the T3DInputComponent register and see that is calls AddTickCallback. This means that I should be getting ProcessTick method calls once the scene is rendered.

I set a break point in the _UpdateInput method and it never gets called. I have the Pro version and source, so I also set a break point in the T3DInputComponent ProcessTick method and it never gets called even though the AddTickCallback was called during registration.

What do I do?

#1
11/16/2009 (9:48 pm)
I figured this one out. When I created my custom component I derived it from the T3DComponent and it created the template that includes a ProcessTick method, so instead of calling the T3DInputComponent's ProcessTick it was calling my component's instead, which is not what I wanted.

I just deleted my ProcessTick in my custom component and it works now.

Problem solved!