Unit's camera height?

Unit's camera height?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
TorenT
Posts: 21
Joined: 28 Jul 2005, 18:31

Unit's camera height?

Post by TorenT »

I've been messing around with custom units and I was wondering what determines the height of the units "camera." By this I mean how do I set how high off the ground the unit's line of sight calculations are made from.
I ask because I have a turret that can shoot a decent range, but it won├óÔé¼Ôäót fire until units are really close. When I go to internal view of the unit I can shoot manually, but since I'm really low to the ground I can't see any units until they are on top of me.
I assume that the unit won't fire automatically until it can "see" the unit, and being low to the ground is preventing it from seeing.
So back to the original question: How do I raise the unit's camera so it will fire on its own and I can see while in it?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If the target, and the units model piece that the weapon fires from dont ahve line of sight direct contact then it wotn fire or if its because a unit is blockignt he way the engine wont allow friendly fire. If your weapon is low on the ground make sure it can actually target the enemy and isnt stuck behind a hill or something. And check that your script is ok and that the unit isnt firing the weapon onyl to find part of its mdoel gets in the way thus damaging the unti itself.
TorenT
Posts: 21
Joined: 28 Jul 2005, 18:31

Post by TorenT »

So if I understand you correctly, you are saying that the calculations are based on the emitter of the weapon (IE the point on the model that the missile is fired from).
So even if the internal camera is low, as long as the weapon emitter is high the weapon will automatically target correctly?
Because as it is now the camera (when unit is possessed) is below where the missiles fire from.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

pretty much yes.
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

The problem might be that each weapons have two points, one fire point and one aimpoint. Spring aims from the aimpoint since that is how you are supposed to do it but on some models that can be quite a bit away from the actual weapon. Then just when you are about to fire spring also double checks that there is a free line of fire from the actual fire point.
TorenT
Posts: 21
Joined: 28 Jul 2005, 18:31

Post by TorenT »

Thanks all, I think I understand the problem now.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

ooh a 3rd person view would be cool. i tried 'c'ing a unit then changing camera view. imo that should let you see the unit from a different perspective. would be pretty cool to say the least 8)
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

I agree, a Halo type 3P mode would be nice.

Halo type controls would even be better.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

SJ wrote:The problem might be that each weapons have two points, one fire point and one aimpoint. Spring aims from the aimpoint ...
Is that why the Annihilator refuses to fire so often? (like with a simple tiny Dragon Teeth in front of it)
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

Screw annihilators, just use Shooters and Penetrators :D

This is far from a priority but i'd really like to have a LOS point on models, if none are there the LOS will be asumed as it is currently.

I'd also like to use weaponless units such as scout planes and such, but they wont function without a weapon...maybe a dummy weapon...hmmm...

but a LOS point would be nice, it would be cool too if the model was displayed while in FPS mode, so if you looked down you would see parts of the model and the guns in screen.

Sorry but i'm a FPS junkie, if I had my way, you could use the units like any other tacical shooter and RTS in one, i'd love to have zoom modes, sight viewing modes (like America's Army and Metal Gear Solid 2/3) etc.

If I had my way, every unit would have a unique interface or HUD.
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

If you had your way, you would double the file size and double the minimum system requirements. But I agree that it would be really cool.
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

You really have to be dead inside to NOT want to orginise a massive battle in Single Player and take one unit and dive it from start to finish as units explode and plane's crash and tank's trundle over mine's and missle
s arch overhead and your puny unit seem's to be lost in the malstrom of battle! :lol: That would be fun.
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

Well While that would be cool, I very much doubt that your Tank/KBot/Plane would survive a WHOLE battle. Except if you had like a bulldog or something. What I think should happen, (I might be talking total crap right now, as I dont know how to model format weorks, but anyway...) is add a simple tag to the model peices that defines when its visible. Like so:

Code: Select all

[LEGS] //The legs of the model
{
  ...Other Stuff...
  Visibility=0 //Visible all the time
}

[HEAD] //The head of the model
{
  ...Other Stuff...
  Visibility=1 //Visible from the normal veiw
}

[COCKPIT] //The legs of the model
{
  ...Other Stuff...
  Visibility=2 //Visible from the FPS veiw
}
Post Reply

Return to “Game Development”