Block Settings to Stop Crouching?

So I have a third person character and I used the collision box method and I got everything done and right, box around the head and add the overlapping then set up a blueprint to make sure it overlaps everything but pawns but when I go to crouch underneath an object, I can still stand back up to Idle position, I was thinking I have to fix the settings of the block that my character is going underneath or do I need to add any components to stop my character from being able to stand up when underneath a block? Someone help me.

use the overlap event to set a bool variable. check that variable when you press the crouch key. use the end overlap event to set the bool variable to the opposite.

Couple questions, should I use the collision box overlap or EventActorBeginOverlap and EndOverlap? I have a bool variable that I use for my crouch animation named “Is Crouching” or do I need to create a new bool variable and check the variable by using a branch?

If you have meshes that you can crouch underneath at different heights, then I would probably setup a trace going from the character upwards and getting the results from ‘Distance’ checking that distance is greater > than X amount before allowing the character to come out of the crouch.

From my bp set up as you see below. It makes my character rapidly crouch and stand up and still going through this small bridge

Would that still work even tho Im using the collision Box method?

This is basically my whole set up at the moment for this to work, does your method fit any where in my blueprint?

Do you think using a tracing logic would interfere with the FPS of the game also I understand which nodes I need to be using to set this up but my problem is that I dont really know how I would go about putting these nodes together because I’ve always been more of a visual learner is why I asked for pictures of the blueprints to help me understand better.

Hard to say, however, I would place it directly after the event is called to come out of crouch. So for example if you are using an action input event for the C-key, you would place the tracing logic on the ‘Release’ event for the C-key, obviously before executing the actual ‘un-crouch’ function which would be called from the branch if your distance is greater than etc.

In this picture, my player can go underneath but can stand up when hes under it but once he passes it he cant go back underneath it I feel like the block doesnt have the proper settings.

A trace is actually computationally cheaper than an overlap. I’ll throw up a screenshot here shortly. If you want, can add me as friend on the epic launcher with the same name core2lord.

That would be really helpful and ill add you here shortly

First of all you should create a new variable named “Can_Uncrouch” or something like that. if can_Uncrouch is true you can allow the player to uncrouch if not do nothing.

Also as someone suggested in a answer below, if you want to use the trace method you can use that, i already provided a proof of concept picture on the first question.

Might be a bit hard to see, but here is what I have for a crouch setup.

Only question I got is how did you get the Up Vector Length?

Maybe we can do a discord to show some things?

looks good. The up Vector should be working, however, the For One Frame on the LineTrace node - that is for debugging purposes only and without having that run on tick or something similar you wont be able to see the trace. Probably want to go ahead and set that to ‘For a Duration’ and set that float to 5 second or something so you can get a visual of the trace itself. Then if you need further debugging, place a printString node from the hit result distance, and maybe actor, as long as you know you are getting actual hits and its passing through the first branch after the trace…

My Up Vector Length doesnt work so dont pay attention to that but I created my main player by going to the object types and selecting object Reference and then setting the type to my character, I got “Get Unscaled Capsule Half Height” and the float integer x I put 3 in the box, I have “LineTraceByChannel” and in the boxes I put “Visibility” and “For One Frame” and the other two I put “GetActorLocation” and “GetActorUpVector” if everything is right all I need is how to get the Up Vector Length and if this is all it should work once I get that

The first picture is my Up Vector Length variable, I created just by hitting the plus on the variable and I want you to check if everything is right along with my Capsule Collisio, to the right are all the settings, the other shots shows that I use that some cubic material to test the crouch collision and that I copied it and shaped it and along with that are the settings to that material that I use, are all my settings good and right.