I’ve read on many sites about Ticking or Tick in UE4. ¿What exactly does this function means?
Sorry for being a noob, but from my understanding, this funcion is called every single frame the engine renders right? If so, How do I use it or call it. I already have this code on my GameCharacter, what im trying to do is to track the Z Velocity to apply fall damage, this is what I have.
.h
virtual void Tick(float DeltaTime) override;
.cpp
#pragma region Tick
void ALevelsGameCharacter::Tick(float deltaTime)
{
Super::Tick(deltaTime);
if (GetCharacterMovement()->Velocity.Z > -200.0f)
{
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, "Fatal fall");
}
}
#pragma endregion
If you’re asking what the hell does pragma regions means, is just regions. I use them to organize and dont mess up my code. I know that there’s no code to apply damage, this is just a debugging code, to see if the engine its tracking the Z-Velocity.