Download

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

See in theory the answer would be that Player sticks to the mesh but keeps momentum, as if the mesh is a floor; But getting that in Blueprint is beyond me, I’ve been trying but Matinee seems to be the only approach at the moment; Which isn’t a permanent solution. Everything that has been said in this thread hasn’t worked :confused: But in the UDK package Sonic GDK they got this flawlessly. As I said I ripped it all open and I couldn’t find how they did it. Its something to do with the “SDKSonicPhysics” but the unrealscript file is empty.

I’d turn your character collision into a sphere that can roll and then play with gravity settings until you can get the momentum to carry the character though the loop. This is what I did for my Bonsai Golf games and it worked out quite well.

Just orient the character in the direction of the normal to the surface and hide the sphere.

This sounds great; However doesn’t the Capsulecollider auto assign when you create a player blueprint; Wouldn’t this over-ride the sphere? How could you tell the blueprint that the sphere is the real collision and not the capsule collider?

To try that I guess you would have to either make a character bp that extends from another class, (pawn probably, but then you won’t have the charactermovement component :p) or change it in C++.

Yeah, I can’t seem to get Character Movement into the Pawn class; So I guess it’ll be hitting the C++ or scripting the behaviours manually.

Is there no functionality to get a character to stick to a mesh though; For example jumping from wall to wall, is there no way to get the mesh to connect to the wall, so the mesh can run along and then when the character jumps, breaking that link again? I noticed Sonic GDK did this (In UDK) but as I’ve said; Ripping it all apart doesn’t shed a hint on light on how they did this.

Right, I’ve tried creating a Pawn class; But without the charactermovementinput, I’m going nowhere fast (Literally).

I also haven’t found how to alter the CapsuleCollider on my character in C++ to turn it into a sphere.

Any help would be very much appreciated. I’m sorry about this everyone - You’re help has been amazing and I feel we’re so close. Once we’ve cracked it, I don’t mind putting up all of my blueprints for the project (When it’s completed) to help feed knowledge back into the community :slight_smile:

SGDK uses line raycasts against world geometry to detect a valid floor normal vector, then it modifies the position and orientation of the character. The flying physics mode is used to ignore gravity and the collision cylinder is shrunk so that it doesn’t collide with the floor. It would be a nightmare to reproduce this with blueprints, but I think it’s possible.

Standard UE4 characters are forced to use a capsule component, you would need to rewrite important code of the CharacterMovementComponent so that it uses a sphere component, but it seems like it’s a good option.

You could also try to use a physics ball and attach the character to it when it’s really needed.

"SGDK uses line raycasts against world geometry to detect a valid floor normal vector, then it modifies the position and orientation of the character." - Tried doing this, but for some reason it wouldn’t work; It wouldn’t go any further then 90 degrees.

**“The flying physics mode is used to ignore gravity and the collision cylinder is shrunk so that it doesn’t collide with the floor. It would be a nightmare to reproduce this with blueprints, but I think it’s possible.” **- I haven’t been able to alter the size of a capsule collider in blueprint whatsoever, there is a node for toggle gravity however it doesn’t seem to be working properly (At least not when I tried to do it).

**“You could also try to use a physics ball and attach the character to it when it’s really needed” **- Do you mean like a physics volume that engulfs the character when he’s going to go through a loop .etc so we could use the gravity .etc from that instead? Thinking about it that way, I could put a sphere over the capsule in the blueprint; But make the capsule stupidly small and the sphere be the main collision. I don’t know if this would work though; But I’m willing to giv

Next week there will be a ball rolling template with the 4.1 update. Depending on how it’s set up it might be easier to start with that and overlay your character on top of that.

I’d also exclude the sphere collision from all but the terrain and things that need to move your character. Isn’t there a new tutorial about this? Capsule would still define damage and powerful pickup stuff.

With the ball rolling template - It might alter the actor to rotate like a ball though and rely on force, right? This would hint that it relies on the Pawn class and not charactermovement

I don’t think there’s a tutorial about it, I’ve tried looking but if you find it, it’d be mighty handy!

So I think the trace downwards would be the way forward; But I can’t seem to get the line trace correctly, it doesn’t seem to attach to the character properly, what part of the character component am I actually supposed to be tracing? Is there a write-up anywhere on UE4 about the trace? I think the reason it’s not working is quite simply that I don’t understand the tool properly.

Someone did this extremely well during the beta, anybody remember who it was?

I have a feeling it may have been with a custom movement component though, or at least some tweaks to the current one.

I’d love a tutorial or at least a rough guide on how line tracing works, or how it would / should work in this example. I feel if I got my head around it, I could do exactly what Sonic GDK did with the trace and alter the position / orientation of the mesh without losing speed.

This is what your looking for. I’ve also tried to find out how to get this mechanic looking good with no joy.

**That is EXACTLY what I’m trying to do. **

This would be ideal for what I’m after; However, something tells me the dev might not want to spill the beans on how it was done, but no harm in asking, eh? If anybody knows the secret, I’d be greatly appreciative! I assume it’s with a line trace and altering the orientation and position of the character; Which I’ve tried already but didn’t seem to get working.

KitatusStudios, I’ve PM’d you.

Where’d you PM me? My inbox is looking pretty empty on here :stuck_out_tongue:

I believe in the UDK they used to set physics to flying and then they would shoot raytraces to detect surface normals. Basically, they’d write their own gravity walking code. So that approach should be feasible in BP

See this thread.

Ideally, I’d suspect you’d want to update the MovementComponent directly. Maybe add a new physics mode, etc

Good Luck

Thanks! Thanks to you and JustinSA, I’ll be ripping apart the spider code from UDK and seeing if I get any closer. I’ll post my results (And how to do what I did) back on here if I’m successful!

In the CharacterMovementComponent there is a WalkableFloorAngle variable you may be able to use/expand on to help.

I’m very interested in seeing how you progress with this so please keep on posting your findings :slight_smile: