a-game icon indicating copy to clipboard operation
a-game copied to clipboard

Compatible with networked aframe?

Open emilevirus opened this issue 3 years ago • 3 comments

I was wondering if there is a way to make a-game work with networked a frame? I tried adding networked attribute to a-player but the position doesn't sync properly.

emilevirus avatar Nov 23 '21 16:11 emilevirus

I have not tested it with networked-aframe.. Keep in mind tho, that the position of a-player is the center of the player's play space at floor level.. If you want to track the player's head, you should track a-camera or maybe .head-bumper..

poeticAndroid avatar Nov 23 '21 17:11 poeticAndroid

I have done some testing and found that the problem might be that the height of a-player cannot be changed. Perhaps adding the ability to change the height would solve the problem of position not syncing. (Or, if the height doesn't matter, just tweaking the networked-aframe example code so that the height of the camera is higher should work. (and of course, turning the camera into a-player also would have to be done.))

willpower-dev avatar Jan 14 '22 22:01 willpower-dev

By height, I assume you mean the position on the Y axis.. a-player is meant to remain at floor level.. I chose to move the player through a parent entity, as I had problems moving the camera directly when in VR mode, at least on earlier versions of a-frame.. And creating a player rig like this seemed to be a common way to move the player around.. I just made it a primitive as well, called it a-player and used it to not only nest the player's head(the camera) but also hands(controllers)..

poeticAndroid avatar Jan 14 '22 23:01 poeticAndroid