Git Product home page Git Product logo

Comments (5)

haydenjameslee avatar haydenjameslee commented on May 14, 2024

Yes its definitely possible to move objects (as long as your client currently owns them) using super-hands. I suspect you are not syncing the correct entity's position and rotation. By default only the top-level entity's position and rotation are synced. If you provide an example showcasing what you think should work I can provide more help. (check out glitch.com for an easy way to make an example).

from networked-aframe.

msimbao avatar msimbao commented on May 14, 2024

Hi Hayden. thanks for the quick reply! Here's an example which is just a bare-bones remix of your basic naf glitch example.

https://glitch.com/edit/#!/bio-gas?path=public/index.html

I was trying to sync a box so that it can be dragged by both users or just one and the other is still able to see the action.

from networked-aframe.

netpro2k avatar netpro2k commented on May 14, 2024

Note that one tricky bit about super-hands in particular is that aframe-physics-system uses a quaternion component to do its rotation, so you will specifically need to sync that. See https://github.com/mozilla/mr-social-client/blob/experiment/super-hands/src/network-schemas.js#L30

from networked-aframe.

msimbao avatar msimbao commented on May 14, 2024

Hi netpro2k, thanks for the response. Adding the quaternion component did help out but apparently the problem was with my code. I just found it and saw that i wasn't adding the progressive-controls component and grabbable components to the correct entities. I was putting them all together but instead had to seperate them.

  <a-entity id="mine" grabbable networked="template:#box-template;showLocalTemplate:true" position="0 1 0" >
 </a-entity>

I'm still having a problem with syncing and the only way it worked was with a glitch in the java o.o (i think the second square brace shouldn't exist at the end)

var boxSchema = {
template: '#box-template',
components: [
"position",
"rotation",
"scale",
"rotation",
"quaternion",
]

    ]
  };
  NAF.schemas.add(boxSchema);

but ill come figure it out. Thanks so much for all the help!

from networked-aframe.

netpro2k avatar netpro2k commented on May 14, 2024

You have rotation in there twice, you actually don't need it at all since the quaternion component actually removes rotation. Also you are correct, there is an extra ]

var boxSchema = {
  template: '#box-template',
  components: [
    "position",
    "scale",
    "quaternion"
  ]
};
NAF.schemas.add(boxSchema);

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.