We develop an optimal transportation meshfree (OTM) method for simulating general solid and fluid flows, including fluid-structure interaction. The method combines concepts from optimal transportation theory with material-point sampling and max-ent meshfree interpolation. The proposed OTM method generalizes the Benamou-Brenier differential formulation of optimal mass transportation problems to problems including arbitrary geometries and constitutive behavior. The OTM method enforces mass transport and essential boundary conditions exactly and is free from tension instabilities. The OTM method exactly conserves linear and angular momentum and its convergence characteristics are verified in standard benchmark problems. We illustrate the range and scope of the method by means of two examples of application: the bouncing of a gas-filled balloon off a rigid wall; and the classical Taylor-Anvil benchmark test extended to the hypervelocity range.