Character Walk on a Wall? (E.g Sonic running around a loop)

It’s stuck at 90, I’ve been wondering if I could change it with C++, but I’m afraid I’ll break something doing that, haha, hence why I’ve been sticking to Blueprint for the time being.

And of course, I hope to find a solution and create a mini-tut on the wiki on how it’s done for future reference for everyone :slight_smile:

Right so, the Spider physics, in theory should easily translate into blueprint. In reality? Not so much. I’m still working on trying that route, but for the mean time I still consider the problem open. The line trace method seems to be making more progress, but no matter if you alter the position / rotation of the character, gravity still comes crashing down. It might be possible to put the character in “Flying” mode, IF I found a way to alter what flying mode does.

It’s starting to look like Matinee is the simplest way. I tried following the SonicGDK route, but nothing. I’m still trying the Spider Physics route, but again: Nothing. There must be a way to do this. I’m going to continue to whack my head repeatedly against the table, anyone is more then welcome to join me in doing so.

I’ll try other methods until it works but if anyone has a spark of genius, you know where to find me!

I think the state machine could be the way to get past that 90 degree angle(as in set variables and conditions when you are about to enter falling state, and thus preventing it from happening).
There’s a new BP tutorial for animation/characters/state machine/control input in Youtube, you should check it out.

State Machines don’t seem to be the way forward as it won’t let the character to continue moving up, just stops them from falling (Which messes up a normal jump) but thanks for sending those tutorials; It’s helpful to learn little things I overlooked! I watched the entire series but there’s nothing about solving this issue, haha. We’ll get there!

As for an update on things, Spider Physics is still not being my friend and the trace (Altering character position / orientation) isn’t working either. One step closer, just not there quite yet!

Well, maybe this could help… UE4 - Project Gravity - Update #1 - YouTube</ti

It’s definitely a direction to explore; I’m worried I’ll break something I shouldn’t touching the source code, however. But it’s definitely a possible solution; But the problem with altering gravity is affecting the jumping / gravity of the other actors in the scene and things like falling of the ramp .etc

So Spider Physics straight up isn’t working, pulling a trace and changing the position / rotation of the character doesn’t work because of gravity (As it’s needed). There must be a way to attach the actor to the loop mesh, which ignores Gravity while the character is attached to the loop. But figuring this out feels impossible.

If anybody has any other ideas, I’m dying (Not literally) for a solution! :confused:

Can you not set gravity scale to 0 whilst doing the trace?
I think you can find the gravity scale within the movement component.

Well, on my Ledge grabbing BP, I just use traces and I move the character to the ledge position, setting its rotation to the normal of the trace hit. And I don’t mess with gravity.So, I don’t see any reason for that to not work for you as well. I think that you just need to, instead of tracing forward like I am doing, just trace down and set the proper rotation. I post my BP ( file and images ) there if you want to take a look.

You can see what I mean here:

problem is that character loses walking friction past certain point(regardless of the character rotation), maximum walking plane angle is hard set to 90 degrees(or, 89.9999999…)

You could try to change the WalkableFloorAngle with C++ and test to see if will cause any problem. Change the ClampMax and UIMax, then you will change the WalkableFloorAngle just for you character… I don’t think it will cause any problem.


	 * Max angle in degrees of a walkable surface. Any greater than this and it is too steep to be walkable.
	UPROPERTY(Category="Character Movement", EditAnywhere, meta=(ClampMin="0.0", ClampMax="90.0", UIMin = "0.0", UIMax = "90.0"))
	float WalkableFloorAngle;

Sadly, this didn’t work. Even though I’ve changed the walkable floor; It still won’t re-align the character with the floor / re-position / rotate him, so he still ends up walking into the floor as if it is a wall. It’s a step closer though! Thanks!

Mini-Update: Turning Gravity Off doesn’t work (Clashes with Jump .etc) - Tracing just isn’t working what so ever - It seems like Matinee might be the only possible option at this time. :confused:

Sorry you still haven’t come right on this one. Maybe have a look at the code for Phys_Walking and setting the loop as the base, getting the pawn (sonic) to attaché to the normals of the loop. Also, make sure the loop is one mesh.

When you say attach to the normals of the loop; How exactly would I pull this off? I’ve tried so many different things. There’s no specific attach function in blueprint and I’ve pulled apart all of the Phys C++ files now and even when I change them it won’t alter much in the game world for what I want to do. Is there a simple way to just say “Hey, the player is now on the mesh, treat this as a ground and attach him to this while he’s on it?”

Not sure if this was mentioned yet but what if you rotate the entire scene and camera minus the character and gravity. This may cause more problems than it solves if you have anything else in the level that uses gravity.

I have too many things that rely on Gravity for that to work; But it’s a smart idea none-the-less! Thanks for trying to help! :slight_smile:

From what I understand about the Phys_Walking and setting an object to “base” status, means that when the actor collides with the “base” object, it is automatically alighned to it via the Z axis giving the illusion of walking on the surface. Perhaps in UE4 you would need to sting together something that removes effects of gravity from actor when collides with “base” object.

I really cant wait for the UE4 Platformer Demo in the Marketplace - I have high hopes that it will address some of these issues.

That’s one of the methods I’ve been trying; No luck. And I don’t think the Platformer demo will include things such as loops and whatnot.

I think I’m ready to admit defeat and just use Matinee. Loop? You have defeated me.

Ok, one last wild thought… Perhaps the character collision mesh became a sphere, and then using velocity of the approach to the loop, physics takes over and gives the same effect as a ball rolling around the loop?