*
* @param usedOwnedEntity if it does not exist it is not an item usage.
* @return true if an activation request got sent. Returns always true if usedItem exists.
*/
private boolean activateTargetOrOwnedEntity(EntityRef usedOwnedEntity) {
EntityRef character = getCharacterEntity();
LocationComponent location = character.getComponent(LocationComponent.class);
CharacterComponent characterComponent = character.getComponent(CharacterComponent.class);
Vector3f direction = characterComponent.getLookDirection();
Vector3f originPos = location.getWorldPosition();
originPos.y += characterComponent.eyeOffset;
boolean ownedEntityUsage = usedOwnedEntity.exists();
int activationId = nextActivationId++;
Physics physics = CoreRegistry.get(Physics.class);
HitResult result = physics.rayTrace(originPos, direction, characterComponent.interactionRange, filter);
boolean eventWithTarget = result.isHit();
if (eventWithTarget) {
EntityRef activatedObject = usedOwnedEntity.exists() ? usedOwnedEntity : result.getEntity();
activatedObject.send(new ActivationPredicted(character, result.getEntity(), originPos, direction,
result.getHitPoint(), result.getHitNormal(), activationId));
character.send(new ActivationRequest(character, ownedEntityUsage, usedOwnedEntity, eventWithTarget, result.getEntity(),
originPos, direction, result.getHitPoint(), result.getHitNormal(), activationId));
return true;
} else if (ownedEntityUsage) {