Template:I BasePropPhysics: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(updates)
Line 1: Line 1:
{{ScrollBox|title=BasePropPhysics|
{{minititle|BasePropPhysics}}
; <code>Wake</code>
{{IO|Sleep|Tell the prop to quit moving. Any physics forces (excluding gravity and water buoyancy) will cause the object to resume moving as usual. Sleeping also occurs automatically when the object has no physics forces to keep it awake, and when it is no longer moving a noticeable amount.}}
; <code>Sleep</code>
{{IO|Wake|If the object was told to sleep, tell it to start moving again.}}
: Manually take the prop in or out of sleep mode. Props sleep after coming to rest and wake if affected by an external force.
{{IO|DisableMotion|Tell the object to stop moving completely. No physics forces will re-enable motion, not even <code>Wake</code>.}}
; <code>EnableMotion</code>
{{IO|EnableMotion|If the object's motion has been disabled entirely, tell it to resume movement as usual. This will also <code>Wake</code> the object, if it is <code>Sleep</code>ing.}}
; <code>DisableMotion</code>
{{IO|DisableFloating|If the object would normally float when in water, tell it to not float. There seems to be no way to re-enable floating behavior, but programming a method to do this should be fairly simple (<code>CALLBACK_DO_FLUID_SIMULATION</code>).}}
: Props with motion disabled will not move under any circumstances.
; <code>DisableFloating</code>
: Disable fluid/floating simulation.
; <code>SetBodyGroup <int></code>
: Set this prop's [[$bodygroup|body group]].
; <code>physdamagescale <float></code>
: Multiplies damage received from physics impacts. 0 means the feature is disabled for backwards compatibility.
; <code>EnableDamageForces</code>
; <code>DisableDamageForces</code>
: Whether damaging the entity does applies force to it.
; {{EP1 add|<code>EnablePuntSound</code>}}
; {{EP1 add|<code>DisablePuntSound</code>}}
: Allow/prevent this prop from playing its own sound when punted
{{I Studiomodel}}
{{I BreakableProp}}
<!-- already included through BreakableProp {{I Targetname}} -->
}}

Revision as of 23:19, 11 September 2018

BasePropPhysics:

Sleep
Tell the prop to quit moving. Any physics forces (excluding gravity and water buoyancy) will cause the object to resume moving as usual. Sleeping also occurs automatically when the object has no physics forces to keep it awake, and when it is no longer moving a noticeable amount.
Wake
If the object was told to sleep, tell it to start moving again.
DisableMotion
Tell the object to stop moving completely. No physics forces will re-enable motion, not even Wake.
EnableMotion
If the object's motion has been disabled entirely, tell it to resume movement as usual. This will also Wake the object, if it is Sleeping.
DisableFloating
If the object would normally float when in water, tell it to not float. There seems to be no way to re-enable floating behavior, but programming a method to do this should be fairly simple (CALLBACK_DO_FLUID_SIMULATION).