Ledge climbing from udk to ue4

I have a method that i used in udk to climb near ledges and detect edges. Vaulting & Ground Sliding Movement - Epic Games Forums
I wanted to know how can you achieve this in rocket? How would you lerp to the location of the edge which you have found out and play a custom anim? Is there any root motion as well? I am stuck with this.

Something like this can be easily achieved by using clever Trace detection. That’s what I was doing in UDK. Just use some Trace to find the top of the ledge and the wall in front of the player. From these data you can compute a location of the ledge. The Traces behind fired inside the Tick function of your playercontroller class. Trace are still available in Rocket. :wink:

Root motion is also doable, check the Platformer Sample, there is a root motion animation called in the C++ code.

Can I call it in a pawn or playercontroller or camera though? Like in udk?
Can you give an example

You can call Trace commands from every class. However they are a bit more complex to use than before. I’m still figuring out how to trigger one correctly.

Like (See the CalcCamera function inside the ThirdPerson base project) :

GetWorld()->BoxSweepSingle(Result, ViewLoc, DesiredLoc, FQuat::Identity, ECC_Camera, BoxParams);

See also : https://rocket.unrealengine.com/questions/1809/how-do-you-perform-a-trace.html

Thanks now i see. Ill try it i know have a procedural ledge system from unity which i tried out but now i need to port it to ue4. And btw that link was posted by me lol.

Here is a trace function I’m using in my project.

FHitResult ACatSniperCharacter::LaserTrace(const FVector& StartTrace, const FVector& EndTrace) const
{
	static FName WeaponFireTag = FName(TEXT("WeaponTrace"));

	// Perform trace to retrieve hit info
	FCollisionQueryParams TraceParams(WeaponFireTag, Instigator);
	TraceParams.bTraceComplex = true;
	TraceParams.bTraceAsyncScene = true;
	TraceParams.bReturnPhysicalMaterial = true;

	FHitResult Hit(ForceInit);
	GetWorld()->LineTraceSingle(Hit, StartTrace, EndTrace,ECC_WorldTrace, TraceParams);

	return Hit;
}

And the function that calls it.

void ACatSniperCharacter::SpawnEmmiter(FVector& SpawnLoc, FVector& SpawnDir)
{
	const FVector StartTrace = SpawnLoc;
	const FVector EndTrace = SpawnLoc + SpawnDir * 3000.0;
	FHitResult Impact = LaserTrace(StartTrace, EndTrace);

	UGameplayStatics::SpawnEmitterAtLocation(this, JumpFX, Impact.Location);
}

Ho thanks, this sample helped me a lot ! :slight_smile:

Hi AemonBarz,

This is an archived post from our beta that is no longer tracked.

If you have any specific questions feel free to post a new question.

Here is a link to the forums where a user has created edge grabbing completely in Blueprints. :slight_smile:

Thanks!

Tim

Is there a blueprint alternative?