Apologies if this has been covered before or is in the quickref; I've had a scour of both and cannot find anything -- how would I go about getting the position of the user?
We are trying to make a hidden-object type game and need to be able to run custom javascript when the user / player is at certain positions (or hotspots) and is looking at certain things. So we need to know where the user is (either an absolute location or a reference Id to which hotspot they are at). I believe we can use adjusthlookat to determine the direction we are looking.
We could either set an interval to determine the user's hotspot / absolute location, or if there are events that fire when a user enters and leaves hotspots (reporting their ids at the same time), we could then run our necessary code.
Any thoughts from anyone about how we can achieve this?
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!