How to make a weight system?

Hi there,
I am wanting to make a weight scale system where the player needs to add boxes on to a platform to reach a certain weight then when the player gets on the platform it then triggers and animation of the platform elevating. I’ve been re-searching online but can’t really find out any methods. I was thinking of creating a volume system to provide a limit then a trigger to execute the animation or something along those lines. Any help would be appreciated.

Thank you!

You could set a variable on each box to be its “weight”. After each box is added to the scale have the scale add that weight to a “total weight” variable on the scale and when it reaches a certain point have it trigger the animation. Really a million ways to do this honestly. Never played around with the physics “mass” stuff but you might even be able to do it that way too.

You could use physics simulation instead. This would mean less logic and programming but more tweaking the physics values

Could you explain how to do it with physic simulation?

I did this with physics as well. You simply set each box to have a certain mass in kg and then you can use the built in physics calculations to get the weight. I had a collision volume on the platform check for all overlapping actors and then got the total weight of each actor. If it was above the set value the platform moves otherwise it wouldn’t.

I’m working on a fluid based game in UE4 with NvFlex. Every particle of my water has weight. I need to know the mass of the container of water to stop emitter when the box is full of water.

I assume all the particles share the same weight. Why not just get the number of particles in the container without calculating their weigh per se?