We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Ar object on android is offset from location

Home Forums General Questions Ar object on android is offset from location

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #59869
    gezwoz
    Customer

    I’ve modified the AR demo by replacing the farmer mesh with my own. The mesh is positioned at 0,0,0 and has its transforms applied.
    On Iphone all works well, but on android, the object does not land on the marker. How do I fix that?

    http://v3d.net/eh2

    #59870
    kdv
    Participant
    // Position the character
    registerOnClick('indicator_invis_plane', false, false, [0,1,2], function() {
      changeVis(['GROUP', 'farmer_group'], true);
      setObjTransform('farmer_armature', false, 'position', [arHitPoint('x'), arHitPoint('y'), arHitPoint('z')], false);
      // Look at me!
      setObjDirection('farmer_armature', getObjTransform('Camera', false, 'position', 'xyz'), true, true);
    }, function() {});

    that’s from your logic file. but in your .blend file you don’t have farmer_group and farmer_armature objects. you changed the model in 3D editor but did nothing in puzzles to handle this model…

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #59871
    gezwoz
    Customer

    It looks like I solved it just yet, by merging the mesh with the farmer mesh.. but still I would like to know how to solve this properly. If I just reference the mesh directly, it’s position is incorrect. So I suspect I am doing something wrong in Blender

    #59872
    gezwoz
    Customer

    Sorry I messed with the upload after I asked the question

    #59875
    kdv
    Participant

    Take the standard AR demo .blend file, remove farmer_armature, farmer_mesh and the customs group (with all objects inside). Copy your flower into the farmer_group group. Scale it down to have more adequate dimensions in the AR mode. Change nothing else. Save and export. In puzzles replace farmer_armature and farmer_mesh with the name of your flower mesh. Save. Launch the app.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #59880
    gezwoz
    Customer

    Thanks kdv for looking into this. Scaling down is not an option though, this needs to be the real size so that Clients can see how it will work in a real life setting. This plant is 2.5meters but larger ones will be made as well. To get an idea of the product / material you can see on lyb.nl

    As I explained earlier, it works fine currently (when I removed the mesh faces of the farmer and joined the meshes of the plant with the empty farmer mesh). I like to know why this works and inserting the mesh directly doesn’t.

    #59882
    kdv
    Participant

    I like to know why this works and inserting the mesh directly doesn’t.

    the answer in the second post: you changed the source file in Blender but did nothing in puzzles to make it work.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #59923

    Starting with Verge3D 4.3 pre1 you can use the camera control object puzzle to set initial position of the camera in AR/VR mode.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #59938
    gezwoz
    Customer

    I like to know why this works and inserting the mesh directly doesn’t.

    the answer in the second post: you changed the source file in Blender but did nothing in puzzles to make it work.

    Thanks, for some reason I had totally overlooked that part in the puzzles as I was focussed on the single AR block. Works well now!

    Starting with Verge3D 4.3 pre1 you can use the camera control object puzzle to set initial position of the camera in AR/VR mode.

    Interesting, so does this mean it will work more like how the iphone does it?

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.