KarmaParams
This is the base class of Karma parameters. It subclasses KarmaParamsCollision. Although technically KarmaParamsCollision could be considered to be the base class of Karma parameters, it leaves out many important parts of Karma simulation and is essentially useful only for ragdolls, which have their own built-in KarmaParams.
General Settings
These values apply to any Karma simulated actor using KarmaParams or one of it's subclasses as it's KarmaParams. Ragdolls are usually set up using KarmaParamsCollision but if set up using these KarmaParams these values will overwrite the defaults set in the skeletal information file.
- KMass
- Density of the Object for Karma physics. This is not absolute mass! Rather, the ratio of mesh volume to mass. In this way, you can have two totally different meshes, but have them be the same density and so have appropriately proportional masses. Non-karma physics use absolute values for anything having to do with their 'mass'. For example, the mass of a Bulldog tire is 0.5, and the mass of the Bulldog chassis is 8. If you compare this to the default mass of an actor (100) you can see that the values for mass within Karma physics are much smaller.
- KLinearDamping
- This is the amount of friction that the actor will experience to oppose any change in location. The default for this value is 0.2. The Bulldog has this set to 0. Note that this is in addition to any friction from other surfaces it touches. This value is merely the ambient resistance. It could be wind resistance, or resistance from an object that it is conceptually in contact with but technically are not in contact within the physics engine. For instance, the wheels of the bulldog are conceptually attached to the axles, but do not actually touch them within the physics engine.
- KAngularDamping
- This is the amount of resistance that the actor will experience to oppose any change in rotation. The default is 0.2. The Bulldog has this set to 0. Similar to KLinearDamping, this is the ambient resistance to rotation. It can be used for wind resistance or for resistance from something that it conceptually is in contact with but does not actually touch within the physics engine. Note that this is not the same as inertial resistance from attempting to rotate an unbalanced object.
- KFriction
- This is the amount of friction this object will experience and exert on other objects it comes into physical contact with. 0 is frictionless, while a value of 1 will exert a lot of friction on objects it contacts. The default is 0.
- KActorGravScale
- This is how much gravity affects this object. It is used primarily to create special effects and also to give a different impression to an object. For instance, a large, heavy object may have this set higher to make it "feel" heavier, without it's mass actually being higher. This can make it easier to move while being equally difficult to take off the ground. 0 means gravity has no effect on this actor. 1 is normal gravity, as specified by the zone/physics volume. Higher or lesser values, obviously, are the appropriate factor of the gravity as specified by the zone/physics volume. Negative values are possible and will cause the object to gravitate in the opposite direction by the factor specified. The default value is 1, for normal gravity.
- KBuoyancy
- Similar to KActorGravScale, this is the amount that being in a WaterVolume affects the KActorGravScale. If it is 0, the object will fall through water as if it were falling through empty air. If it is 1, the buoyancy will exactly cancel the gravity. This will cause the object to be suspended in place in the water, unless it was already falling when it entered the water in which case it will retain it's current velocity and generally coast to a stop. Values of KBuoyancy greater than 1 will make the object float in the direction opposite the gravity, with higher values causing more acceleration in the direction. I believe that this can be negative, but I have not tested it. I also believe that this is independant of gravity, IE 1 negates the gravity regardless of KActorGravScale, however, I have not tested it for values of KActorGravScale other than 1. The default for this value is 0.
- KRestitution
- This is how "springy" the object is. 0 is extremely solid, 1 is completely elastic. This is best to experiment with to get the desired effect as it is somewhat complex to calculate the ideal setting. The default is 0.
- KImpactThreshold
- If the actor is impacted by another Karma object at a velocity greater than this setting, an event will be triggered in the Unrealscript for that object. The default value for this setting is 100000. Note that the velocity is in Karma units, and, like mass, is not the same scale as the regular physics engine. : The event that is triggered is as follows:
event KImpact(actor other, vector pos, vector impactVel, vector impactNorm)
Other is the object that impacted this actor. Pos is the position of the impact. ImpactVel is the velocity of the impact, and ImpactNorm is the normal vector of the impact. (I believe that it is the normalized negative impactVel.) - KStartEnabled
- If this is set to true, the object will begin simulating as soon as it is created. If it is set to false, the object will lie dormant and will not simulate until it is interacted with by another Karma actor through collision, or if it is shot by a weapon. This value defaults to false.
- KStartLinVel
- A vector describing the initial velocity of this actor when it is spawned/the level is loaded. It defaults to (0,0,0).
- KStartAngVel
- A vector describing the initial angular velocity, or rotation rate, of this actor when it is spawned/the level is loaded. It defaults to (0,0,0).
- bKNonSphericalInertia
- Describes how mass distribution should be calculated. If it is false the object is assumed to have it's mass distributed spherically. This will cause it to rotate quite freely. If it is set to true, the inertia will be calculated based on the shape of the static mesh used to display the object. The object is assumed to be uniformly dense for this purpose. Center of mass is also calculated automatically based on this information. If you want to override either of these values you must use the subclass KarmaParamsRBFull. This value defaults to false, so spherical inertia is used by default.
- KStayUpright
- If this is set to true, the actor will remain upright. This means that it will not be permitted to roll or pitch, it may only yaw. If KAllowRotate is also false, it may not yaw either. If it is false, the object may rotate freely, within the limits set by any constraints attached to it. The default for this value is false.
- KAllowRotate
- If KStayUpright is set to true, and this value is set to true, the actor may pivot on it's Z axis. (yaw) If KStayUpright is set to true and this is set to false, the object may not rotate at all. If KStayUpright is set to false this setting has no effect. This setting defaults to false.
- KAng3 / KTriList / KLastVel
- Simply put - do not touch these. They are used internally by the Karma engine and are set as constant. Even if you found a way to change them you would probrably crash the game by doing so. KLastVel can be read if you have a use for it, I am fairly certain that it stores the objects velocity last tick for acceleration calculations. The other two values are integers and I do not have any idea what they measure.
- bDoSafetime
- If true, do extra checks to avoid object passing through world. May cause collision bugs in SVehicles with CollisionSpheres.
Rigid Body Specific Settings
These values apply only to Karma Rigid Bodies. They have no effect on Karma Ragdolls.
- bHighDetailOnly
- If this variable is set to true, this actor will only be simulated if the physics detail is set to PDL_High. If this variable is set to false, Karma physics will be used as long as the physics is PHYS_Karma. If this variable is set to true and the physics detail is not PDL_High, this object will use normal physics only. Karma Ragdolls will always simulate, regardless of the physics detail or this setting. By default, this value is "1," which, since it is a boolean, I believe will be interpreted as true at compile-time.
- bClientOnly
- If this variable is set to true, the actor will simulate client-side and will not have it's simulation information replicated constantly. For obvious reasons, this should only be used for benign objects that will not collide with anything, or, like swinging meat on the roof, will not move enough to make an appreciable difference in collision. It can also be used for objects which will not be collided with, such a cieling fan that is high up out of reach. Karma ragdolls will always act as if this was set to true, as their motion is not replicated. By default, this variable is set to "1," which I believe is interpreted as true at compile-time.
- bKDoubleTickRate
- If this is set to true, the object will be simulated twice as frequently as objects who have this set to false. Note that on rare occasions, objects with bKDoubleTickRate set to true may not collide with objects that have it set to false. However, this will occur only if the double-ticked actor clears the regular-ticked actor befor the regular actors next tick. This value defaults to false.
- bDestroyOnSimError
- If this is set to true, the actor will be destroyed if a simulation error occurs. This generally only happens if for whatever reason a Karma object is spawned deep within BSP geometry, though theoretically it can occur under different circumstances. This is usually true on servers and false on clients. If a client has a simerror and the server does not, the server will fix the Karma simulated object when it is next replicated. If the server sufferes a simerror it will replicate the destruction of the object even if the clients have bDestroyOnSimError set to false. This value defaults to true.