laugh Yes, you found the bug I was talking about. NULL is used only for level geometries (level_ent). Here, you are creating a terrain, called terrain_ent. So to enable event between those two entities, you need to change

Code:
pX3ent_setcollisionflag(you, NULL,PX_PF_NOTIFY_TOUCH);



to

Code:
pX3ent_setcollisionflag(you, terrain_ent,PX_PF_NOTIFY_TOUCH);



In the previous version, event is always called after you used an entity to register for an event, even if the entity is colliding with a different entity.