UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

60 lines (29 loc) 1.09 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [Block](./server.block.md) &gt; [getNeighborGlobalCoordinateFromHitPoint](./server.block.getneighborglobalcoordinatefromhitpoint.md) ## Block.getNeighborGlobalCoordinateFromHitPoint() method Gets the most adjacent neighbor global coordinate of this block based on a relative hit point, typically from a raycast. Use for: placing a new block on the face that was hit. **Signature:** ```typescript getNeighborGlobalCoordinateFromHitPoint(hitPoint: Vector3Like): Vector3Like; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> hitPoint </td><td> [Vector3Like](./server.vector3like.md) </td><td> The hit point on this block (global coordinates). </td></tr> </tbody></table> **Returns:** [Vector3Like](./server.vector3like.md) The adjacent block coordinate in world space. \*\*Category:\*\* Blocks