User Tools

Site Tools


character:physics

This is an old revision of the document!


Physics

Define here how this character moves and reacts to applied forces in your game.

Move Forward Speed: How fast this character moves when walking forward.

Move Back Speed: How fast this character moves when walking back.

High Moving Friction: When this character stops moving, should it stops immediately or slide slightly (based on the friction)?

Friction: When forces are applied to this character while on the ground, how far will it “slide”. If High Moving Friction is off, this friction will also be applied to the character when its walking. Characters like Hakan (SF4) while oiled up, has a very low friction.

Jump Force: How much power is applied by this character when it jumps. The higher the force, the higher the jump.

Jump Distance: When making an angled jump, how far will this character move while in the air.

Air Jumps: Set double/triple jumps here. This works as any game with double jump, aka, pressing up while in the air.

Character's Weight: The weight or the character related to air resistance. Weight directly affects every air force applied to this character, including jumps. Example: A character like Dhalsim can it's weight set to a very low value, making him almost “float”.


Code access:

UFE.config.player1Character.physics

Code example 1:

void OnHit(HitBox strokeHitBox, MoveInfo move, CharacterInfo hitter){
	if (hitter == UFE.config.player1Character){
		if (UFE.config.player2Character.characterName == "Shozo Iizuka") {
			UFE.config.player2Character.physics.weight = 175;
		}
	}
}

Code example 2:

void OnMove(MoveInfo move, CharacterInfo player){
	if (move.moveName == "oil up"){
		player.physics.friction = 10;
	}
}

< Back to Character Editor

character/physics.1394576941.txt.gz · Last modified: 2014/03/11 18:29 by Mistermind