Announcement

Collapse
No announcement yet.

Vehicles, karma and gravity

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

    Vehicles, karma and gravity

    Hi just a general question on vehicles really. When you exit a vehicle it slows down and then switches its karma off but i cant find the code for it. The attack craft must have weight added to it to make it sink to, Is it all done natively?

    #2
    ya, karma actors act karmactically all the time. natively. when they go below a certain speed (variable) they sleep until something interacts with them, but its still being karma. gravity is calculated by the current physics volumes gravity * kgravmultiplier (or something like that). I assume the code that tells the attack craft to ignore gravity is native if you can't find it. Might wanna browse through the native source for it (which is available for vehicles on teh inneterweb somewhere)

    Comment


      #3
      Thanks i wanted to have my craft change state when its stationary.
      So i now i've got it just checking the crafts velocity in tick once the driver has exited the craft. But there are two functions for when the driver leaves. KDriverLeave() and clientKDriverLeave(). So would i be right in thinking that i just have to put the same call to start checking in tick in both functions and that no extra replication conditions are needed in either function for the code to work in all situations?
      or are the two different functions to do with what type of player enters the vehicle?

      Comment


        #4
        Im not sure if this is what you are talking about but you can set the physics for any actor in the game using the SetPhysics (EPhysics newPhysics) function. You can pass in one of the following

        Code:
            PHYS_None
            PHYS_Walking
            PHYS_Falling
            PHYS_Swimming
            PHYS_Flying
            PHYS_Rotating
            PHYS_Projectile
            PHYS_Interpolating
            PHYS_MovingBrush
            PHYS_Spider
            PHYS_Trailer
            PHYS_Ladder
            PHYS_RootMotion
            PHYS_Karma
            PHYS_KarmaRagDoll
            PHYS_Hovering
            PHYS_CinMotion

        Comment


          #5
          I think KDriverLeave gets called on both the server and the client, but ClientKDriverLeave only on the client.

          Comment

          Working...
          X