- Newest
- Most votes
- Most comments
@REDACTEDUSER
I have changed, but still not triggering the OnTriggerAreaEntered
This is the Lua Script.
function triggerDoor:OnActivate()
self.triggerHandler = TriggerAreaEntityNotificationBus.Connect(self, self.entityId)
Debug.Log("OnActivate ")
end
function triggerDoor:OnTriggerAreaEntered(entityId)
Debug.Log("------- TRIGGERED.")
end
function triggerDoor:OnEntityExitedTriggerArea(entityId)
Debug.Log("------- TRIGGERED.")
end
<br>
REMOVEDUPLOAD
I read this in the documentation, but I could not find the checkbox.
"Note
You must use a physics component and select the Proximity Triggerable check box in order for an entity to interact with the trigger areas."
Also
At the class TriggerAreaComponent.cpp we have these two lines:
<em>EBUS_EVENT_ID(GetEntityId(), TriggerAreaNotificationBus, OnTriggerAreaEntered, entityId);
EBUS_EVENT_ID(entityId, TriggerAreaEntityNotificationBus, OnEntityEnteredTriggerArea, GetEntityId());
<br></em>
@REDACTEDUSER
To help others:
function puzzeCamera:OnActivate()
self.triggerHandler = TriggerAreaNotificationBus.Connect(self, self.entityId)
end
function puzzeCamera:OnDeactivate()
self.triggerHandler:Disconnect()
end
function puzzeCamera:OnTriggerAreaEntered(entityId)
Debug.Log("------- TRIGGERED.")
end
function puzzeCamera:OnTriggerAreaExited(entityId)
Debug.Log("------- saiu TRIGGERED.")
end
Hey @arineto, thanks for testing that out — I did notice one more thing. Let's give it a try! Please replace TriggerAreaEntityNotificationBus.Connect(self, self.entityId) with TriggerAreaNotificationBus.Connect(self, self.entityId). You may need to re-browse the Lua file in the Lua Script Component for the script to work :)
This post is closed: Adding new answers, comments, and votes is disabled.
Relevant content
- Accepted Answerasked 7 years ago
- Accepted Answerasked 6 years ago
- asked 5 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago