void AMurphysLawCharacter::MoveRight(float Value)
{
	if (Value != 0.0f && CanPlayerMove())
	{
		// add movement in that direction
		AddMovementInput(GetActorRightVector(), Value);
	}
}
void AMurphysLawCharacter::MoveForward(float Value)
{
	if (Value != 0.0f && CanPlayerMove())
	{
		// If the character is going backward, he can't be running
		if (Value < 0.f)
		{
			SetIsRunning(false);
		}

		// add movement in that direction
		AddMovementInput(GetActorForwardVector(), Value);
	}
}
Example #3
0
int CPlayer::CanPlayerMoveDown(CBlock** pushingBlock)  { return CanPlayerMove( 0,  1, pushingBlock); }
Example #4
0
int CPlayer::CanPlayerMoveUp(CBlock** pushingBlock)    { return CanPlayerMove( 0, -1, pushingBlock); }
Example #5
0
int CPlayer::CanPlayerMoveRight(CBlock** pushingBlock) { return CanPlayerMove( 1,  0, pushingBlock); }
Example #6
0
int CPlayer::CanPlayerMoveLeft(CBlock** pushingBlock)  { return CanPlayerMove(-1,  0, pushingBlock); }