Game Development Community

Bravetree tank pack and turret camera

by Jason Granum · in Torque Game Engine · 12/14/2004 (10:24 pm) · 24 replies

I've just purchased the bravetree tank pack and must thank Bravetree for this awesome and very well done resource! Every resource I've gotten from them has been extreemly well documented and easy to understand - a wealth of information!

On to my question however. When the tank turret turns the camera stares straight ahead of the tank thus not allowing the player to see where they are shooting. Is it possible to have the camera follow the turret without any or very few engine code changes? Thanks!
Page «Previous 1 2
#1
12/15/2004 (1:41 pm)
I've also purchased the pack (thanks Bravetree, very cool resource). I have some similar request.
I've noticed that there are no cam node nor eye node in the 3DSmax file. I suppose the 3 camera position are handled by script (datablock TankCameraData) + code.
So could it be easy by script (or code) to have a 1st person camera attached to the turret (turn left/right) or (better for me) attached to the cannon barrel (turn left/right + up/down).

PS : I like the smooth camera transitions, great job.
#2
12/16/2004 (5:11 pm)
The same question I have.I suggest that creating a Tank Pack forums area for the users.
#3
12/16/2004 (11:36 pm)
Hi tyq.fk, cool to see we have always same interest about vehicle with turret ;-)
I don't know if there are enought tank pack owner for a dedicated forum, but when I will have the camera feature I need with the tank, I would like to share it with others tank pack owner, and I don't know how we can currently expose part of the pack code, certainly not in the "Torque Game Engine Public Area >> Discussion" :D
Maybe the private SDK forum will be enought, Bravetree ?
#4
12/18/2004 (6:58 am)
Talking about it in the private SDK forum is Ok. Sorry for the delay in responding-- holiday preparations and contract work have us head down.

Note that some of these things we did not include in the pack because we had to draw the line somewhere or we would still be working on it.
#5
12/18/2004 (8:52 pm)
Thanks!
#6
12/21/2004 (2:08 pm)
Same request as others. I am new to the engine and content pack, but a first person point of view would be great. The current view is a bit limiting to fire from in the demo since a majority of the time you cannot easily see where the turret is aimed. I can't kill Kork damn it :-)

Kudos on the tanks though..... I was going to render a TRON version myself, but it hopefully will be much easier to use yours.
#7
01/01/2005 (9:44 pm)
I Suggest that Bravetree make a "Camera Pack" for TANK PACK.I would like to pay it.
#8
01/03/2005 (9:58 am)
I just commented out all references to the camera in the Source code and in my scene that I exported I added a cam node and an eye nod where I wanted them.

ie. the cam was above and behind the mount point and the tankall was the parent to the cam so wherever the tank went the cam followed.

The eye was where the barrel began from the tank and elevated a bit. The parent for eye was codeWeapon so where ever the barrel moved so did the eye camera.

I use lightwave and that is how I achieved this.
#9
01/03/2005 (4:21 pm)
Adding the "cam" and "eye" node only get a 1st person view,Is there a way to change the camera attached to the cannon barrel ?
#10
01/04/2005 (3:27 am)
The cam node should give you third person.

Here is how mine looks: == is tank * is cam # is eye


*

======== #
====================
============
==========


Maybe you could explain exactly what view or views you want when driving around?
#12
01/04/2005 (4:59 am)
Just noticed that the turret doesn't rotate 360o and the real tank does? Whats up with that am i the only one that noticed that?
#13
01/04/2005 (5:53 am)
Michael,thanks for your reply.I am interested in your 1st person view,It is what I want,could you tell me how to achieve it in codes?Thank.
#14
01/04/2005 (6:59 am)
@ tyq.fk

In tank.DB.cs

//camera = "DefaultTankCamera";

Also any reference to the camera code in the C++ source that came with the pack. I think they are all in tankShape.h and tankShape.cc

I think there are 2 places where you need to edit code slightly. If you have any coding knowledge at all it should be no problem.

something like if (blah && !(blah && blah && camera))
changes to
if (blah && !(blah && blah ))// && camera))

and an if else statement that should be commented out concerning the camera.


Compile and that is it for code changes. You just need to change your scene like I did in the explanation above for the cameras to follow properly and you should be set. I assume you read the dock on how to mount as a player and just to spwan as a tank.
#15
01/04/2005 (8:52 am)
Quote:
Just noticed that the turret doesn't rotate 360o and the real tank does? Whats up with that am i the only one that noticed that?

This is controllable by the tank datablocks. We limited it b/c it looked/felt better in a game environment (artistic license if you will).
#16
01/04/2005 (4:31 pm)
Michael,I didn't get it work,I only find 1 place like " if (blah && !(blah && blah && camera)) " at line 304 in tankShape.cc:

if (server && !(fx && misc && camera))

-->I change it to:

if (server && !(fx && misc)) // && camera))

The engine lock up when I change these codes.Could you explain more clear?Thanks.
#17
01/05/2005 (6:34 am)
@tyq.fk check your email (hotmail). I have your solution.
#18
01/05/2005 (8:19 am)
Hey Michael, can you email me your fix, I am having the same issue. From look at your screenshots, that is exactly what I am looking for. Maybe we can start a thread in the private forums and you can explain exaclt what you did.
#19
01/05/2005 (11:54 am)
I'm not sure how to go about discussing the changes. I don't want to show source because people that just own TGE and not the Tank pack would see tank pack source. The changes are very simple just comment out the references to camera in the source. I'm no C++ guru by any streatch of the imagination. I just have some programming knowledge. If you can understand Torque script. It should be easy to make the adjustments. I'm not trying to ridicule anyone. I know it is frustrating when you need help.

No offense but I really don't want to provide any support for a pack i'm not involved with.

If Bravetree wants I will send them the modified files so they could add it to their pack. I know they worked hard on all of their packs and I don't want to inadvertantly give out their source.

Again the changes are trivial. Just look at the source and you will see how easy it is.
#20
01/05/2005 (12:25 pm)
Michael,

If you want to send us what you did, we will incorporate it into the next update. We alos feel pretty comfortable with you discussing the source chang4es, but would prefer that it be done in the private forums (those withput pirvate forum access won't be changing it anyway)

Joe
Page «Previous 1 2