Zeroing/Stopping Momentum

Is there a good way to zero/stop or otherwise set the momentum on an object? I have a scene where I want a script to set absolute boundaries for player object so that if the object goes outside due to some fluke, it moves the object back into the world. However, whenever I do this the object seems to go flying, so I thought zeroing momentum would fix it. Thanks in advance.

Why not just put a bunch of invisible box colliders around your level?

Otherwise you can always use rigidbody.velocity = Vector3.zero;

Wow, don’t know how I missed that. Looks like there are a few handy variables and functions on the Rigidbody class. To make this post not a waste of the project lead’s time, here’s a feature suggestion: allow us to change some of these properties (velocity, angularVelocity, etc.) from the editor, for testing purposes. I don’t have Unity in front of me, so chances are it is in there, you just have to change properties from full to debug or something like that. Thank for the help!