Bug #1417: Use fmod to wrap local rotations (more efficient and robust)
Bug #1417: Make sure to reset all position/rotation fields when placing items