Collisions

Hi.
i having a problem with my project implementation. I need to use collisions but i’m new in Panda3d and i´m having a lot of problems with it. I already have consult some forums and documentation but it hasn’t very helpful. Could anyone help me with some examples of collisions between objects.

thanks in advance :slight_smile:
pjan

You don’t give us much information to help you with, for example if you are using Python or C++, or what you are trying to use collisions to achieve.
Maybe if you can show what you have tried so far, we can help with why it does not work.

Hi.
The collisions of the players are defined in this way:

def setupCollissions(self, num, cTrav):
    self.numPlayer= num # numero do jogador
    #registo das colisoes do ralph
    self.Zcoll = cTrav
    self.ZcollQueue = CollisionHandlerQueue()

    #jogador e terreno
    self.groundCol = CollisionNode('playerRay'+str(self.numPlayer))
    self.groundRay = CollisionRay()
    self.groundColNp = self.ralph.attachNewNode(self.groundCol)
    self.groundRay.setOrigin(0,0,1000)
    self.groundRay.setDirection(0,0,-1)
    self.groundCol.addSolid(self.groundRay)
    self.groundColNp.node().setFromCollideMask(BitMask32.bit(1))
    self.groundColNp.node().setIntoCollideMask(BitMask32.allOff())
    self.Zcoll.addCollider(self.groundColNp, self.ZcollQueue)

    self.playerPath = self.ralph.find("**/Cylinder02")
    self.playerPath.node().setFromCollideMask(BitMask32.bit(0))
    self.playerPath.node().setIntoCollideMask(BitMask32.bit(0))
    self.Zcoll.addCollider(self.playerPath, self.ZcollQueue)

but the playrate became 14.8 or slower. Is there something wrong on the collisions code?

thanks in advance
pjan :smiley: