Modulus operator

I think it’s better to use the modulus operator here, rather than dividing by 60, flooring, and scaling back up by 60.

The modulus operator (%) will give you the remainder of TimeRemaining divided by 60.

3 Likes

I was actually unable to get the tutorial method to work but yours works fine.
Is anyone else getting it wrong here?

1 Like

Try switch the floor to a type other than Integer64, I feel like that part of the course is a quirk of using the Early Access version of Unreal Engine 5

3 Likes

Because you did not completely follow the course.
In minutes, Time Remaining is getting divided, and you should then get the divided Time Remaining.

In Seconds, You are actually getting Time Remaining, BEFORE it has been divided.

Yes, I am getting the same error and the only option available is the floor function. Not sure if it’d work the same as floor to integer 64. Although I went with modulus approach and it works just fine. Thanks!

Privacy & Terms