void APawn::Restart() { UPawnMovementComponent* MovementComponent = GetMovementComponent(); if (MovementComponent) { MovementComponent->StopMovementImmediately(); } ConsumeMovementInputVector(); RecalculateBaseEyeHeight(); }
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); }
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; } }