Example #1
0
void APawn::Restart()
{
	UPawnMovementComponent* MovementComponent = GetMovementComponent();
	if (MovementComponent)
	{
		MovementComponent->StopMovementImmediately();
	}
	ConsumeMovementInputVector();
	RecalculateBaseEyeHeight();
}
Example #2
0
void ACharacter::OnStartCrouch( float HeightAdjust, float ScaledHeightAdjust )
{
    RecalculateBaseEyeHeight();

    if (Mesh)
    {
        Mesh->RelativeLocation.Z = GetDefault<ACharacter>(GetClass())->Mesh->RelativeLocation.Z + HeightAdjust;
        BaseTranslationOffset.Z = Mesh->RelativeLocation.Z;
    }
    else
    {
        BaseTranslationOffset.Z = GetDefault<ACharacter>(GetClass())->BaseTranslationOffset.Z + HeightAdjust;
    }

    K2_OnStartCrouch(HeightAdjust, ScaledHeightAdjust);
}
Example #3
0
void AUTWeaponPawn::PossessedBy(AController* NewController)
{
	Super::PossessedBy(NewController);

	if (Role == ROLE_Authority)
	{
		if (MyVehicleWeapon)
		{
			// TODO: Implement ClientWeaponSet
			//MyVehicleWeapon->ClientWeaponSet(false);
		}

		RecalculateBaseEyeHeight();

		// TODO: Check the use of EyeHeight and BaseEyeheight
		//Eyeheight = BaseEyeheight;
	}
}