Files

41 lines
790 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MercanRey3.js — getMarkPosition() (satır 51)
[← MercanRey3.js](index.md) · [← Master](../../wiki.md)
```javascript
function getMarkPosition(player)
{
var result = player.rayTraceBlock(24);
if (result != null && result.isBlock())
{
var hit = result.getHitPosition();
if (hit != null)
{
return {
x: hit.x,
y: hit.y + 0.05,
z: hit.z
};
}
var block = result.getBlock();
return {
x: block.x + 0.5,
y: block.y + 1.05,
z: block.z + 0.5
};
}
var pos = player.getPosition();
return {
x: pos.x,
y: pos.y,
z: pos.z
};
}
```