Home › Forums › General Questions › Ar object on android is offset from location
- This topic has 8 replies, 3 voices, and was last updated 1 year, 8 months ago by studiogijs.
-
AuthorPosts
-
2023-01-25 at 1:38 pm #59869studiogijsCustomer
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?2023-01-25 at 2:00 pm #59870kdvParticipant// 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
andfarmer_armature
objects. you changed the model in 3D editor but did nothing in puzzles to handle this model…Puzzles and JS coding. 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 the meaning at all.
2023-01-25 at 2:17 pm #59871studiogijsCustomerIt 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
2023-01-25 at 2:17 pm #59872studiogijsCustomerSorry I messed with the upload after I asked the question
2023-01-25 at 5:28 pm #59875kdvParticipantTake the standard AR demo .blend file, remove
farmer_armature
,farmer_mesh
and thecustoms
group (with all objects inside). Copy your flower into thefarmer_group
group. Scale it down to have more adequate dimensions in the AR mode. Change nothing else. Save and export. In puzzles replacefarmer_armature
andfarmer_mesh
with the name of your flower mesh. Save. Launch the app.Puzzles and JS coding. 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 the meaning at all.
2023-01-25 at 11:45 pm #59880studiogijsCustomerThanks 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.
2023-01-26 at 5:00 am #59882kdvParticipantI 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 coding. 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 the meaning at all.
2023-01-26 at 1:03 pm #59923Alexander KovelenovStaffStarting with Verge3D 4.3 pre1 you can use the camera control object puzzle to set initial position of the camera in AR/VR mode.
2023-01-26 at 4:09 pm #59938studiogijsCustomerI 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?
-
AuthorPosts
- You must be logged in to reply to this topic.