coeng

diff src/sim.cc @ 7:af24cfbdf9b6

adding collision detection
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Feb 2015 10:08:00 +0200
parents 2f872a179914
children 8cce82794f90
line diff
     1.1 --- a/src/sim.cc	Sat Feb 14 07:27:12 2015 +0200
     1.2 +++ b/src/sim.cc	Sat Feb 14 10:08:00 2015 +0200
     1.3 @@ -9,7 +9,7 @@
     1.4  
     1.5  void SimWorld::add_object(GObject *obj)
     1.6  {
     1.7 -	CoRigid *co = COCAST(CoRigid, obj->get_component("phys"));
     1.8 +	CoRigid *co = COCAST(CoRigid, obj->get_component("rigid"));
     1.9  	if(co) {
    1.10  		add_rigid_body(co);
    1.11  	} else {
    1.12 @@ -27,7 +27,7 @@
    1.13  
    1.14  void SimWorld::remove_object(GObject *obj)
    1.15  {
    1.16 -	CoRigid *co = COCAST(CoRigid, obj->get_component("phys"));
    1.17 +	CoRigid *co = COCAST(CoRigid, obj->get_component("rigid"));
    1.18  	if(co) {
    1.19  		remove_rigid_body(co);
    1.20  	} else {