fix code so that rendering and physics are independent.

Signed-off-by: Sébastien Boisvert <sebastien.boisvert.3@ulaval.ca>