- 최신
- 최다 투표
- 가장 많은 댓글
@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 :)
이 게시물은 마감됨: 새 답변, 댓글 및 투표 추가가 비활성화되었습니다.
관련 콘텐츠
- AWS 공식업데이트됨 2년 전