Add to Blueprints (TruncToInt & TruncToFloat)

Add in the Blueprints from the C++ Math Lib TruncToInt & TruncToFloat.
Because to convert in BP from 5.7 to int give 5 but from -5.7 to int give -6…
and BP don’t have Truncate (or i don’t find that).

You have floor, fceil and round to select the one you prefer : as Math Expression Node | Unreal Engine Documentation rounding functions. If this is what you are looking for.

As i said i need truncate (floor, fceil and round) aren’t the same.

You can make macro function with float trunc and use it whenever you want.

Something like that:
2015-01-20 15-49-39 Minimal_Default  - Level Blueprint Editor.png

There’s the Twitch talk on extending the editor later today. I’m hoping they will show us how to add our own nodes like this.

Reload the page, I’ve updated the macro… It is very simple to do by your self. And thats why we have to use macros sometimes, because there a lot of functions, that are missing, and that is ok, because blueprints are Very powerful, so we can always make something we want.

Macros are nice and all, but a node that does the same thing would be better. :slight_smile:

Looks like pretty basic node for me, but what the difference between basic global macro and written function with such node? There is no difference to end user and everyone who needs truncate can create own truncate in a matter of minutes Just copy that and paste into Graph :slight_smile:

Done. Included in the 4.8 as Truncate. ^^
*Added by me, thanks you Epic!