Dear Friends at Epic,
I have read all the prior swimming threads, and I have my water volumes set up correctly.
Additonally, swimming was working perfectly in 4.1.1 !
After upgrading to 4.2, now when I enter a water volume, I have a per-tick read out showing me that the movement mode is never switching to “Swimming”
It stays as “walking” the whole time!
#Readout Code
void ASolusBasePlayerController::PlayerTick(float DeltaTime)
{
Super::PlayerTick(DeltaTime);
//~~~ FPS ~~~
CalcFPS();
//~~~ Player Input ~~~
SolusProcessPlayerInput();
//physics??!
if(C_SolusChar)
{
VShow(C_SolusChar->CharacterMovement->GetMovementName());
}
}
Above is always showing Walking, even in water volume.
#Repro
Set up a water volume
Run into it
In both first and third person templates my character just gets stuck
#Pitch
I did try adding pitch to the forward movement function, that did not help.
void ASolusBaseCharacter::MoveForward(float Value)
{
if (Value != 0.0f)
{
// find out which way is forward
const FRotator Rotation = GetControlRotation();
FRotator YawRotation(Rotation.Pitch, Rotation.Yaw, 0);
// Get forward vector
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
// add movement in that direction
AddMovementInput(Direction, Value);
}
}
#Manually Setting to Swimming = Can’t Move Still
If I set movement mode to Swimming every tick,
I can’t move!
void ASolusBasePlayerController::PlayerTick(float DeltaTime)
{
Super::PlayerTick(DeltaTime);
//~~~ FPS ~~~
CalcFPS();
//~~~ Player Input ~~~
SolusProcessPlayerInput();
//physics??!
if(C_SolusChar)
{
//Manually Set to Swimming every single tick
C_SolusChar->CharacterMovement->SetMovementMode(MOVE_Swimming);
VShow(C_SolusChar->CharacterMovement->GetMovementName());
}
}
The output does show the char movement as “Swimming”
I can jump while character is outside of the water volume
but as soon as character enters water volume even jumping does not work and character is completely stuck against the ground.
#Thanks!
Any ideas?
Thanks!
Rama