Hi.
I am having trouble setting up collision. And I think the cause is that car is an instance of Actor class because I had no problem at all when i used
self.car=model.loadmodel("models/car/carnsx.egg")
Here is my code
self.car=Actor("models/car/carnsx.egg")
self.car.reparentTo(render)
self.car.setScale(.5)
self.car.setPos(20,0,0)
self.car.setH(270)
My attempt setting up collision
self.carbody=self.car.find("**/car_body")
self.carbody.setFromCollideMask(BitMask32.bit(1))
self.carbody.node().setIntoCollideMask(BitMask32.alloff())
#self.carbody.show()
Here is the error:
File "test.py", line 99, in setupCollision
self.carbody.setFromCollideMask(BitMask32.bit(1))
AttributeError: 'libpanda.NodePath' object has no attribute 'setFromCollideMask'
Thanks in advance.