About Store Forum Documentation Contact



Post Reply 
Trigger.
Author Message
Dampire Offline
Member

Post: #1
Trigger.
I create an actor and set it's as trigger
Code:
Actor trigger.create(blah, blah, blah);
trigger.trigger(true);

In documentation I founded a method.
Quote:PhysicsClass & reportTrigger (void(*ReportTrigger)(PhysTrigger &trigger, PhysTrigger &actor))
set custom function for reporting trigger events, this function will be called for actors (with enabled 'Actortrigger') when they collide with other actors, 'ReportTrigger' function should be multi-threaded safe
How I can use this method? How I can overload it? Thanks.
(This post was last modified: 10-23-2010 10:30 AM by Dampire.)
10-22-2010 10:49 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: Trigger.
Not positive about this, but I believe it should work like so:

Code:
void customFuction(PhysTrigger &trigger, PhysTrigger &actor)
{
    // do whatever...
}

Code:
Physics.reportTrigger(customFuction);
10-26-2010 08:41 PM
Find all posts by this user Quote this message in a reply
Post Reply