Game Development Community

Advanced Camera Shapes not Rendering

by Sean Burgoon · in Torque Game Engine Advanced · 02/23/2009 (3:09 am) · 2 replies

Up until now I've been using the default T3D level to test all my changes. Today I decided to build my first actual level and start populating it. Having done so I load into the level and, oddly, none of my aiplayers are drawing. Static shapes, terrain and such draw just fine, but aiplayers are not drawing. If I toggle from the Advanced Camera chase cam I set up to the regular camera, suddenly everything draws, but in AdvancedCamera mode, on luck. The stranger thing is that this doesn't happen in simple.mis (the default mission I've added a bunch of spawns to). I can't think of what could be different between the two to cause the advanced camera to wig out like this... any ideas?

#1
02/23/2009 (3:55 am)
Well, I figured out the cause of the problem, though I haven't solved it yet. Apparently, in advanced camera mode, the engine is using the world origin instead of the camera for vis-distance calculation. What I mean is, if my vis distance is set to 2000, and a non-static object is more than 2000 units away from the world center, it won't render. It's odd that the player still renders, but I'm guessing the player never has vis-distance calculated. I'll dig into the code later and see if I can figure out why this is happening, but if someone else has already solved this, or knows where the vis-distance calculations take place in code and can point me to the right function, that would be very helpful. Thanks!
#2
02/24/2009 (12:37 am)
And it's solved (in case anyone was following this). I was able to fix the issue by adding %this.advCamera.setTransform(%player.getEyeTransform()) to createPlayer() in game.cs. I must have just missed that step at some point.