on my approach, i have a object that is the "preview" and that one checks if the next grid contains the same size as i need, if yes, keep saving last position. Once i click, the actual object is placed in last position. But this doesnt takes into account the object form,being able to place outbounds