here is the status of Trigger volumes
- Code: Select all
inline bool dgCollisionInstance::IsTriggerVolume() const
{
return m_isTriggerVolume ? true : false;
}
inline void dgCollisionInstance::SetAsTriggerVolume(bool mode)
{
_ASSERTE (0);
}
They are going to be revamped after I go over the destrution.
however a trigger volome can not work the way to say, They do not generate contacts.
my interpretation of a trigger volome is a region os space ther work as a bollean variable that is on if a in object is inside or partially inside teh volume or zero when it is outside.
The use teh same fuintiosn fo teh collsion system bu the do no calculate contacts, this is what make them fast
you can do any operation you want at the higher level using the state of the trigger including calculating the contacts using the volume itself and the object inside the volume
for what you say above, I beleive teh behaviod I descricrve completle solves the problem. no need for caculetion contacts unless you wna to know teh exact location of teh triget volume that was hit.
all you need to do is have a memory in yot actor that save teh current state of the trigger
something like this
- Code: Select all
state1 = ColleionGetTriggerState();
if (!state0 & state1) {
//the actor hit teh trigger for the first time, do anythong (open door)
}
state0 = state1;
you could do that with collisions and material and callback for trigger, but it will be much elegant whne the trigger funtionality is in