Issue related to the secret wall in Crypt Raider game

Hi, I just finished my Crypt Raider game, but I’m having an issue with the secret wall. It started to move/displace without attaching any Gargoyle grabber component. However, when I attach the Gargoyle to the wall, it gets attached and then moves down perfectly. This could be due to the Mover C++ component attached to the secret wall. I also attached this Mover component to the cell side mesh, and it’s working fine there. Additionally, I’m not able to remove the Mover component from the secret wall. I’ve attached the gameplay video and the Mover C++ file in the drive for your better understanding.

Google Drive Link

Here’s my Mover C++ code:

UMover::UMover()
{
	PrimaryComponentTick.bCanEverTick = true;
}

void UMover::BeginPlay()
{
	Super::BeginPlay();
	
	OrinalLocation = GetOwner()->GetActorLocation();  
	
}

void UMover::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

	FVector TargetLocation = OrinalLocation;
	if (ShouldMove) 
	{
		TargetLocation = OrinalLocation + Moveoffsets;
	}
	FVector CurrentLocation = GetOwner()->GetActorLocation();
	float Speed = Moveoffsets.Length() / MoveTime;    

	FVector NewLocation = FMath::VInterpConstantTo(CurrentLocation, TargetLocation, DeltaTime, Speed);

	GetOwner()->SetActorLocation(NewLocation);
} 

void UMover::SetShouldMove(bool NewShouldMove)
{
	ShouldMove = NewShouldMove;
}

Hi, did you manage to resolve the issue?

Hi, thanks for your reply. Unfortunately, I am still struggling with the issue, and because of this, I can’t progress in the course.

Ok. I will try taking a look in the next few days.

Hello, I don’t see a problem just yet with this code, more than likely it could be that your trigger component is changing the “should move” function when it shouldnt be, or for some reason you could have physics enabled on the wall and its colliding with something. but I think the problem might be somewhere in the trigger component or grabber, if you could post that we might have a better idea.

That actually looks like collision causing an issue. There’s definitely nothing in the code that would cause that sort of behaviour.

Clean up your project by exiting Unreal, remove the Intermediate, Binaries, Saved, and if present ipch and .vs folders as well as DerivedDataCache folder.
You may want to do this with a copy of the project.

Once done, zip (actual zip file please, not RAR or 7z) and upload to https://gdev.tv/projectupload and I’ll try get a look at the project. Without looking at it, not much more that I can offer other than to suggest re-reviewing the lectures where you set up that secret wall. Something is very wrong with the setup but not sure what

Thank you for the your help @TTF_GameDev @beegeedee. I’ve resolved the issue. All I had to do is to set trigger box to moveable.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms