Game Development Community

Problem wih advanced camera

by Guimo · in Torque Game Engine · 08/07/2006 (5:33 pm) · 8 replies

Hi,

I've got a problem with the advanced camera but in fact I'm not really sure its the advanced camera at all (it just works fine) or something else in my code. I'll try to explain.
I'm using the advanced camera in GodView mode located over the player. When the player vehicle is created and the camera is asociated to my player object (a flying vehicle in this case), it looks like the camera is relocated underground and then moves gradually from wherever it is located at startup to its final position 50 units above and 20 units behind my player. This relocation takes about 2 or 3 seconds and I really don't like it. I just don't want the camera to fly to its destination... I wan't it to relocate inmediately to its final location...

This is my logic:
a. When player connects to server, the server commands the player to select its ship and texture.
b. As the map has already been loaded the map is redered on the client behind the model/texture selection GUI. The map is rendered about 50 units above the ground. No problem there.
c. Once the player selects his ship, the information about the model and texture is sent to the server.
d. The server finds an spawn point (all spawn points are located at 20 units height... the hover height of my Flying Vehicle) and spawns the player using the selected ship model and skin. Then it sets the target object of the Advanced Camera as the shp and sets the offset and the godViewMode. Then it commands the client to start (StartGame).
e. The client hides the model selection GUI and ... in this moment... the camera relocates to some point underground and then flies to its final position 50 units above and 20 units behind the car. Then I can control my ship normally but I just don't want that movement.

I can send the scripts if required (but not the flying vehicle datablocks as they have been taken from the Warsparrow pack)

But thats not all. The funny thing is that I tried to track the movement on the client and on the server. So I created a thread in the client and one in the server so each 10 msecs, just after sending the StartGame message, they command the server to print the Ship position, the advancedCamera position and the camera position for 8 seconds son in case there's any position change I may know the problem... but the funny thing is that the messages tell me that all the three objects are located in its right positions and they dont move!!! Which really has no sense as I can see the movement.

I've manually set the Advanced Camera transform so just after the vehicle its created its located above it but nothing... it keeps relocating underground and then gradually moving to its fnal position.

I don't know if there's another camera I should consider or if there's some trick I'm missing. If anyone may help me with this one I'd be in debt.

Luck!
Guimo
Spritekin Entertainment
http://www.spritekin.com
http://www.warscale.com

#1
08/07/2006 (5:51 pm)
Well in my opinion, the Advanced camera resource is quite broken still.

Did you go the NUMEROUS fixes in the resource post?

No one seems to want to update this camera. it's a shame since the camera system is so critical to most games.
#2
08/07/2006 (11:09 pm)
I applied the fixes but none seems to work. But I guess there must be some way to do it.

Hope anyone can give me a hand on this.

Luck!
Guimo
#3
08/08/2006 (1:08 am)
I've read somewhere that the Advanced cameras' world position is always 0,0,0... Might have something to do with it.
#4
08/08/2006 (8:40 am)
Hi Burning...

3 seconds... when I change the camera for a normal flying camera and then wait 3 seconds then I can switch to the advanced camera and everything goes fine... like if the obects require 3 seconds to relocate before the camera can get its final position.

Now I have a serious doubt if the problem is the camera moving to the target or the problem is the target that 'falls' and the camera is following it. I'll add more objects to the scene so I get a viewing reference.

Luck!
Guimo
#5
08/09/2006 (9:42 am)
I placed a lot of objects floating at 20 units distance of the ground. I can confirm now that it is the camera which floats to the flyer and not the flyer falling to the camera.

The worst part is that the camera just won't report any change on position... trying to track the camera position always give me the same final position while it is obviously moving.

I've found many complaints about this in the forums. The camera system should be oficially improved in order to handle every situation. This one of the most impotant systems in any game engine.

Luck!
Guimo
#6
08/09/2006 (12:21 pm)
The advanced Camera is a community resource, not a GarageGames product. It's a combination of several users contributing to specific functionality (I know, I was one of them before I became an employee) for specific cases.

The stock camera is quite effective, and does some amazing things. Modification of camera operations for game specific functionality does however require programming skill, and in some cases isn't a trivial issue.
#7
08/09/2006 (9:24 pm)
Hi Stephen,

I understand that but in many cases a lot of code has been integrated into Torque. I've found a lot of fixes which were proposed as a resource but now are part of the engine.

Some examples...
Hover starting height for flying vehicles.
Improved ObjectViewer (and this one is part of the TLK which is an 'official' resource)
Exposing the camera object.

I'm sure I will find a lot more of them in the forums. Why not making the advanced camera an integral part of the engine and give credit to the authors. Or in other case make the default camera more flexible. In a recent blog (August 4, 2006), Torque 1.5 was announced along with the near release of the TSE. Won't GG use this opportunity and improve the camera object a little?

Luck!
Guimo
#8
08/12/2006 (9:48 am)
OK, I managed to solve the problem... I posted a simple solution to the Advanced Camera resource thread.

Luck!
Guimo