Game Development Community

another question: client camera

by Matthew Franklin · in Torque Game Engine · 09/10/2002 (1:32 am) · 1 replies

How can I get a client's camera? I've been trying to use Sim::findObject on the clientId, and while that works well for the first player when a client joins, the client doesn't work at all-- the clientIds vary between instance, it appears.

Do I send the name, and look it up somehow? Is clientId the correct variable, and I'm using it incorrectly?

Basically, I'm doing this:

GameConnection* clientCon = (GameConnection *) Sim::findObject(mClientId);
ShapeBase* sb = clientCon->getControlObject();

It works wonders on the first instance, but each player that joins doesn't get a proper camera, and eventually crashes, so I'm guessing I need some more univeral ID system.

Thanks in advance! BTW, the mod is really sweet (works well with bots), so I'll be sure to post it up when it gets all polished up.

#1
10/15/2003 (2:41 pm)
Did you finally got that working? I'm in need of something similar. I would like to control my clients' camera...