How i can set gravity for one object so that it acts by attraction on another object?

Or just change everything to matter.