Git Product home page Git Product logo

Comments (10)

haydenjameslee avatar haydenjameslee commented on May 14, 2024 1

@antoniohof if you're still running into issues please open a new issue.

@42loop this example has been added: https://github.com/networked-aframe/networked-aframe/blob/master/server/static/shooter-2.html

from networked-aframe.

haydenjameslee avatar haydenjameslee commented on May 14, 2024

RE: discussion - All of the discussion for Networked-Aframe happens in the networked-aframe channel on the A-Frame Slack (invite link) and this is open to all WebVR developers.

RE: Syncing other objects - This does work, there must be something broken in your implementation. Please post some example code so we can help you debug, and for the best help put a simple example up on Glitch.com and post the link here. We can then remix the Glitch project to make it work for you.

from networked-aframe.

haydenjameslee avatar haydenjameslee commented on May 14, 2024

It also would be useful to make an official example showing how to do this.

from networked-aframe.

mauriciomartinez-itesm avatar mauriciomartinez-itesm commented on May 14, 2024

Yes I haven't been able to sync objects either... I'm using a dynamic-body object so that might affect, nevertheless, what is happening, is that it's creating one instance of the object for each player that connects to the server, but that's it, no rotation/position gets synced. @haydenjameslee told me that objects with physics are not yet supported, I'm commenting here since you're having a similar problem.

from networked-aframe.

haydenjameslee avatar haydenjameslee commented on May 14, 2024

@mauriciomartinez-itesm would you be able to post a glitch project that shows the problem? I'll make a project myself to confirm its working (or not) as far as I'm understanding the problem.

from networked-aframe.

mauriciomartinez-itesm avatar mauriciomartinez-itesm commented on May 14, 2024

sure, here's the project... sorry for the mess and the spanish comments

from networked-aframe.

haydenjameslee avatar haydenjameslee commented on May 14, 2024

Could you explain what's supposed to happen and what's actually happening that's incorrect?

from networked-aframe.

mauriciomartinez-itesm avatar mauriciomartinez-itesm commented on May 14, 2024

Yes, please ignore all the things that are not NAF...
There's supposed to be a dynamic-cube that's lying there (it's supposed to be one to be shared by all) players have a cube on their feet so they can move the dynamic-cube it around (with wasd)

Instead of having one dynamic-cube for all, I get one cube for every person that connects, and theirs positions are not shared, so a player can move them, but the other player won't see anything besides the movement of the player (not the cubes)

from networked-aframe.

haydenjameslee avatar haydenjameslee commented on May 14, 2024

Gotcha. What you're seeing isn't a bug. The use case you're describing isn't supported out of the box with NAF. Its one of the next features we'd like to add, usually referred to as a "singleton entity". Currently when you create a networked entity, either dynamically with javascript or statically in the HTML, that client will create a new entity which will be created for everybody else. If you have two clients you'll have two entities.

One way to get around this is the idea of a "master" client that is solely responsible for creating such entities. See: #61

from networked-aframe.

antoniohof avatar antoniohof commented on May 14, 2024

I tried to sync the visible attribute, but it does not work.
Whenever a change the attribute, it does not sync.
I have registered it in the schema, and changed it with vue data binding.
Tried to change also with the usual setAttribute, but also does not work...

      var speakingSchema = {
        template: '#speaking-icon-template',
        components: [
          'visible'
        ]
      }
      window.NAF.schemas.add(speakingSchema)

        <script id="speaking-icon-template" type="text/html">
          <a-entity id="speaking" visible="false">
            <a-image src="#speaking-icon-image" position='0 0.85 0'></a-image>
          </a-entity>
        </script>

        document.getElementById('speaking').setAttribute('visible', false)

Would appreciate some help!
Thanks

from networked-aframe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.