fix transform for physics.
add test for physics transform.
Merge pull request #7234 from boyu0/iss5614_physics_transform

closed #5614: add transform support for physics