physics (CNS) (Read 6125 times)

Started by JustNoPoint, September 30, 2015, 04:12:36 PM
Share this topic:
physics (CNS)
#1  September 30, 2015, 04:12:36 PM
  • ******
Part of the Statedef
You need to specify what physics to use in that state. Valid values are "S" for stand, "C" for crouch, "A" for air, and "N" for none. To leave the physics unchanged from the previous state, use a value of "U". If omitted, the value of "N" is assumed. The kind of physics is used to determine how P1 behaves.

For "S" physics, P1 will experience friction with the ground. The value for the friction coefficient is set in the Player Variables.
For "C" physics, P1 will experience friction, just like in the "S" state.
For "A" physics, P1 will accelerate downwards, and if his y-position is greater than 0 (ie. he touches the ground) he will immediately go into his landing state.
If you use "N" P1 will not use any of these pre-programmed physics.
Do not confuse "physics" with the state "type". They are usually the same, but you are given the choice if you want more control. For instance, you may choose to use "N" (no physics), and specify your own acceleration and landing detection for an aerial state.
Last Edit: October 13, 2015, 07:58:28 PM by Odb718
Re: physics (CNS)
#2  October 01, 2015, 10:04:22 AM
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
You may also enter U, Unchanged, the state will use the physics from the previous one if none are set.

I think there is also a rarely used Physics = L although i could be confusing that with type. Only time that gets used is in the hit states for the liedown hit stuff.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: physics (CNS)
#3  April 12, 2016, 09:20:42 PM
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
Just to clarify, A physics will always cause the player to go to state 52 when they make contact with the ground. Considering most landing states of aerial specials typically have landing recovery times longer than that of the default landing state or a different animation, its better to use N physics in these cases and manually assign a changestate to a new landing state to give you greater control.

Additionally, S and C physics will affect any X velocities applied to the character, including those set by a Velset controller that is constantly active. ie: a constant X velset of 5.0 with S physics (assuming the default standing friction coefficient of 0.85) will actually cause the player's X-velocity to be 4.25, not 5.0. This also applies to the walking & running velocities set in the character's CNS (the actual velocity will be this value scaled by the friction coefficient).