constraining object to a triangle plane
Create a new mesh shaped in the way you require the object to be constrained - in your case a single triangular face - and add a Shrinkwrap constraint to your object set to Closest Surface Point with Target set to the mesh. This will constrain the location to the closest point on that mesh. This will work for any shape of constraint.

To demonstrate, here a Copy Location constraint has been added to Suzanne to move her to the location of an empty. In addition, the Shrinkwrap constraint has been added and targetted at the triangular mesh.



Moving the Empty causes Suzanne to follow, but only within the bounds of the triangle mesh :