Skip to content

Await raycast result#466

Closed
mc-zuri wants to merge 6 commits intoPrismarineJS:masterfrom
mc-zuri:master
Closed

Await raycast result#466
mc-zuri wants to merge 6 commits intoPrismarineJS:masterfrom
mc-zuri:master

Conversation

@mc-zuri
Copy link

@mc-zuri mc-zuri commented Jun 30, 2025

No description provided.

const ori = new Vec3(click.origin.x, click.origin.y, click.origin.z)
const dir = new Vec3(click.direction.x, click.direction.y, click.direction.z)
const block = this.world.raycast(ori, dir, 256)
const block = await this.world.raycast(ori, dir, 256)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raycast is async method

@mc-zuri mc-zuri changed the title await raycast result Await raycast result Jun 30, 2025
@mc-zuri
Copy link
Author

mc-zuri commented Jul 5, 2025

Currently it emits invalid object
image

@mc-zuri mc-zuri closed this Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant