Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World position coords of an Entity #38

Open
PRIMETSS opened this issue Oct 9, 2017 · 1 comment
Open

World position coords of an Entity #38

PRIMETSS opened this issue Oct 9, 2017 · 1 comment

Comments

@PRIMETSS
Copy link

PRIMETSS commented Oct 9, 2017

Thanks for your great work Kevin! Ive enjoyed playing with the lib!

Im struggling to find how to get World coords as shown in the Debug info.
Ive looked for hours but just can seem to work out where Phoria.Debug get this value from?

@ajh123
Copy link

ajh123 commented Nov 7, 2020

The debug information gets the position from

var p = entity.worldposition
ctx.fillText("{x:" + p[0].toFixed(2) + ", y:" + p[1].toFixed(2) + ", z:" + p[2].toFixed(2) + "}", x, textPos); //Thats how it renders them

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

No branches or pull requests

2 participants