• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [Help] Physics and States

Well, you can extend PlayerController.LongClientAdjustPosition().

But why tick is bad? You should't underestimate performance of modern hardware. Or even performance of 10-year-old PC. Adding a few extra checks in every tick won't have any impact on performance at all.
 
Upvote 0
Are there functions present in the Pawn or Controller that are called if the state is changed or if the physics are changed? That way I can do checks there if they change instead of in timer or tick
Apart from going in to every function and checking to see where it sets physics, it looks like no...

The best thing to do would be using GetPhysicsString() to find out if it changes each tick, but that's not what you're looking for.

If that's the way you wanna go, GetPhysicsString() is in xPlayer, which is a parent of KFPlayerController.
 
Upvote 0
Well, you can extend PlayerController.LongClientAdjustPosition().

But why tick is bad? You should't underestimate performance of modern hardware. Or even performance of 10-year-old PC. Adding a few extra checks in every tick won't have any impact on performance at all.

Well with the amoutn of things running already I need the best performance and I see constantly checking the pawn physics and controller state every tick is kinda slow
 
Upvote 0
Well with the amoutn of things running already I need the best performance and I see constantly checking the pawn physics and controller state every tick is kinda slow

Are you kidding? Checking enum values is slow? You can save state in some int value, changing its code when you enter each state - yes it's kinda lame but it will eliminate need in calling GetStateName function.
 
Upvote 0