Announcement

Collapse
No announcement yet.

Limiting Turret Yaw Arc of Fire

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Limiting Turret Yaw Arc of Fire

    I am working on limiting a turret to a set yaw arc of fire but can't seem to get (I think this is the right name - don't have my notes handy) SetYawLimitMin and SetYawLimitMax to work correctly. Using a rough calculation of 182 per degree, I can't limit the turret to pivot between 90 and 270 degrees. Right now these values appear to do nothing as the turret can still rotate the full 360. I am left feeling that the SetYaw stuff is just for root vehicle movement somehow...

    Anyways it just looks bad when the AI pivits the rear and front turret and shoots through the aircraft's body.

    On a non-related topic if the camera bone penetrates does this kill the driver pawn? As a gunner, if I pivot at turret far enough, I die unexpectedly. I can yaw all I want, but piviting results in death sometimes. Usually "Player left a small crater" is the message.

    #2
    i think that death is related to the collisions set on the vehicle
    since i think there is code that says something like
    kill on penetrate so if you go tru a mountain bsp hole or something that you dont get stuck behind it
    so it kills you
    what you could trie move the collision or make it small so it wont touch the actor camera
    or just adjust the bone where the camera will be so its not going tru any collisions

    well thats what i think anyways

    Comment


      #3
      Not sure because I haven't taken a look at the UT2004 turret code, however since it sounds like your problem is dealing with the collision cylinder of something I would take a look at the Encroaching events and functions that are relating to the gun turret/vehicle.

      The fact is, Encroaching basically means that a collision volume is right inside of another one, telefraging is due because of this, basically "Two bodies do not occupy the same space".

      Comment


        #4
        The variables "TurretStartConstraint=" and "TurretEndConstraint=" can be used to limit the turret's rotation. These are placed in the default properties of the turret. I'm pretty sure that 16384 is around 90 degrees. You have to experiment with these variables and find out.

        Comment


          #5
          If you die while in a turret, see if you die without even moving the turret around. I was getting a ____ Has left a crater message. I solved it by having bCanBeBaseForPawns=True.

          Comment


            #6
            the only problem using that to true is that for example if the vehicle is a helicopter type
            people on ctf or something similar can use it to transport the flag
            so be carfull using this on the type of vehicle that would create unbalance on a certain gametype

            Comment

            Working...
            X