what about doing just when the actor has to move instead of the tick event. The problem with this is if you move the actor to a point where he has to change direction more than one time, then you’ll need to check it in a more active way…
Maybe a timer could help. Or maybe doing the actors to move to only one direction at a time (using something like target points to create the route instead of just move to the final target)
hi Meguido, i tried that but… yes, the character changes it’s sprite depending on it’s movement direction… (think jrpg style 2d characters)
i don’t know how to make the actor to move to only one direction at a time.
i only use the simple move to command. which they have to adjust path depending on the maze in front of them, thus, making it change sprites as they change directions…
If you have a character already set up, you should be able to try it. Spawn a few hundred of them, make them move around, and see if and how it affects your frame rate. I think the time to check the enums will be completely insignificant compared to the GPU time to draw the hundreds of sprites.
hello , i did try that, normally it was 160 fps… spawned 100 characters… and moved them… some idle, some moving everywhere… etc… it dropped to 55fps… thou close to 60fps… it still bothered me…
and trying to look for another alternative than a a per frame check ( event tick )