Hi i would like to block hack that expands other players bounding box so you can touch anywhere on screen and you will hit the player. This is quite good advantage but i absolutely do not have any idea how to prevent this.
I will release some combat Huristics that can find this soon, they´ll be in my AntiCheat Plugin SAC. Thoose detections aren´t released, yet. you´ll have to wait for the 3.2.1 release.
because you can not check the touch direction, so if victim is within player interact range, there's nothing to check (or idk about anything)
i can check both angle (very complicated maths and physics ) and distance with my heuristics. So it shouldn´t be too hard.
there is a way to get the direction of a player : PHP: $damaged_entity = $event->getEntity();$damaged_entity_position = new Vector3($damaged_entity->getX(), $damaged_entity->getY(), $damaged_entity->getZ());$damaged_xz_entity_position = new Vector3($damaged_entity->getX(), 0 , $damaged_entity->getZ());$damager = $event->getDamager(); $damager_position = new Vector3($damager->getX() , $damager->getY() , $damager->getZ() );$damager_xz_position = new Vector3($damager->getX() , 0 , $damager->getZ() );$damager_direction = $damager->getDirectionVector();$damager_direction = $damager_direction->normalize();$damager_xz_direction = $damager->getDirectionVector();$damager_xz_direction->y = 0;$damager_xz_direction = $damager_xz_direction->normalize();$entity_xz_direction = $damaged_xz_entity_position->subtract($damager_xz_position)->normalize();$entity_direction = $damaged_entity_position->subtract($damager_position)->normalize();$distance_xz = $damager_xz_position->distance($damaged_xz_entity_position);$distance = $damager_position->distance($damaged_entity_position);$dot_product_xz = $damager_xz_direction->dot($entity_xz_direction);$angle_xz = rad2deg(acos($dot_product_xz)); $dot_product = $damager_direction->dot($entity_direction);$angle = rad2deg(acos($dot_product)); $angle is the difference betwenn the hitted entity and the players direction. $angle_xz is the difference betwenn the hitted entity and the players direction WITHOUT the Y angle included. (the more safer method). This has to be put into the onDamage() event handler. BTW, i already kick players if they have high angles and a dist or 3.5 blocks or more
if you use this hack, you can theoretically click anywhere on screen to hit the player that is in you field of view and within your interact range, so both checks will pass
i also kick ppl that are in interact range, but hit fast and with high distances (that prevents a significant advantage, and detects your hack, probably.)
an entity has an exact position on server side, which cant be modyfied by the client. if someone doesnt look at the entity (This is handled server-side, cant be modyfied by the client, althogh the client can hit the entity.) hes hitting, i can always detect this. However , i need to go for today, ill be back tomorrow. bye
hes just looking at it for the client, the server is showing that hes looking next to ti. and even if hes looking at it, i still have a triggerbot detection . bye and until tomorrow.