Panda3D offers many more options for collision solids and handlers than we used in this chapter. Most of these have specific uses that won't apply to our game, but we should talk about them briefly so we know when to use them.
The different collision solids in Panda3D are:
CollisionSphere
– A simple sphere, the most basic collision solid. This solid is excellent as both a From object and an Into object. A sphere is defined by a position and a radius.mySolid = CollisionSphere([posX], [posY], [posZ], [radius])
CollisionTube
– A tube is formed by a cylinder with hemispherical end caps. This shape is sometimes referred to as a capsule. The tube is only suitable for use as an Into object. Define a tube with its two end points, and a cylinder radius.mySolid = CollisionTube([pos1X], [pos1Y], [pos1Z], [pos2X], [pos2Y], [pos2Z] , [radius])
CollisionInvSphere
– This is very similar to the regularCollisionSphere
, but instead of considering...