Can any of this be moved off Tick?

So I’ve been toiling away on my first game project, and I wanted to make sure I wasn’t putting too much into my On Tick event for my character controller:

I know it’s alright to have some things run on tick, I just don’t want anything silly and/or unnecessary and I’m too much of a novice to tell. Please, lend me your guidance!

The tasks in order are:

1.) Check if the player is being crushed to death. For some reason this is a very difficult thing to determine since most of the time the player will clip through an object before it discerns I’ve been crushed. So I ended up using a bunch of Capsule traces to try and guess when the player’s in a spot too small for them.

2.) Check if the player’s head is below a water plane. This is just a line trace shooting straight up, checking for anything with the Liquid tag.

3.) Check for Wallrun. I used to do this on-hit, but I kept encountering issues where the On Hit event wouldn’t trigger. So instead I now have two capsule traces running on either side to detect overlap with a wall. I also tried to do this with trigger volumes on the controller itself but they also wouldn’t trigger. If there’s anything I’d like to keep on tick it’d be this.

4.) Dynamically change the FOV based off the player’s velocity.

5.) Update player’s ‘starting’ sliding speed. This one I feel should be easy to move off, but I keep encountering something like a race condition, where if I don’t keep track of the starting speed before the slide actually begins, it’ll not inherit the correct velocity. I also need to check to see if the player is standing on a slope that’s too steep, and if so force them into a slide state. This is different from the ‘walkable angle’ auto-slide, which is really just falling in style, no?

6.) Dynamically play a sound based off player velocity, similar to 4.

1 Like

1 and 2 could be done with a collision component. Scale them and use their Begin Overlap to trigger checks.

I am assuming you mean something like a Sphere Collision component attached to the Character Controller? Do you know what collision preset I should use so it generates these events without picking up the controller itself? It seems all the ones I try either trigger on nothing or don’t trigger at all.

You’d put them on the character.

For Actual “head below water” you’d have one attached to the head bone. Should be a relatively small collision just encompassing the top of the head. I’d go with box. Disabled by default (no collision). When you enter a water volume/swimming mode you’d enable it.

Post processing is triggered by the camera.


For crushing I’d use a capsule just big enough to wrap the torso. On begin overlap → do checks.
This is assuming the things that can crush don’t block the characters primary capsule component.

Ah, I only use a plane for my water, as soon as the head goes below it the screen goes black. I don’t actually use any water volumes. I also don’t have a head bone. Unfortunately I’ve yet to be able to make a collision component that detects the water plane.

As for the crushing one, I’ve gotten one of my collision boxes to actually proc on overlap events (The other one still doesn’t, which is weird because they’re the same. But the issue here is its also colliding with my trigger volumes meaning I get crushed to death by my autosave checkpoints. Is there a collision preset that stops this from happening or do I have to tag my stuff and ignore it manually?