Monday, July 4, 2022
HomeGame Developmentc++ - Skipped operate calls on Integer based mostly body information

c++ – Skipped operate calls on Integer based mostly body information


I am making a fundamental animation system, the place I name features to alter the rendered sprite and activate hitboxes based mostly on the present body of the animation.

For instance, if (current_frame == 8), I activate the hitbox. Then, if it hits one thing or if current_frame == 9, the hitbox is turned off.

Nevertheless I’ve stumbled into an issue. If I implement an assault velocity modifier, like, 20% assault velocity improve, on seventh sport replace, the current_frame is 8.4 and I miss the operate name to activate the hitbox. I do know I can implement one thing like (current_frame >= 8 && <= 9), however this does not work If I add an assault velocity multipler of 100% or extra – the body will likely be skipped and features would not be known as.

I am additionally open for brand new animation methods / books / articles to review!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments