Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 15, 2008, 4:33:50 PM (16 years ago)
Author:
rgrieder
Message:

Added callback for collisions. Every WorldEntity that collides against another will be called with the following function:
virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
btManifoldPoint is from Bullet and tells you more about the contact point, like position.

Per default, the callback is disabled. Enable it with this→enableCollisionCallback(), for instance in your derived class constructor.
Note that if you activate the callback for e.g. SpaceShips, but not for MovableEntities, then collidesAgainst will only be called in the SpaceShip. This could be changed however, just ask me.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.