How to get EXACT look position.

Started by KabiKabi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to get EXACT look position.

I already know how to get the block the player is looking at. I'm looking for some way or mathematical formula to get the exact position of the players crosshair, not the block position.

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what do you mean?
Wed, 07/09/2025 - 20:26

what do you mean?

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use blocks: X vector of…
Wed, 07/09/2025 - 20:31

Use blocks: X vector of entity/target; Y vector of entity/target; Z vector of entity/target.

You can set their radius using the commutative property of multiplication. Then add them relative to the player's position (EX: X + (Vx * radius), Y + (Vy * radius), Z + (Vz * radius))