Home › Forums › General Questions › Ar object on android is offset from location
- This topic has 8 replies, 3 voices, and was last updated 2 years, 9 months ago by
studiogijs.
-
AuthorPosts
-
2023-01-25 at 1:38 pm #59869
studiogijsCustomerI’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 #59870kdv
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_groupandfarmer_armatureobjects. 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 #59871
studiogijsCustomerIt 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 #59872
studiogijsCustomerSorry I messed with the upload after I asked the question
2023-01-25 at 5:28 pm #59875kdv
ParticipantTake the standard AR demo .blend file, remove
farmer_armature,farmer_meshand thecustomsgroup (with all objects inside). Copy your flower into thefarmer_groupgroup. Scale it down to have more adequate dimensions in the AR mode. Change nothing else. Save and export. In puzzles replacefarmer_armatureandfarmer_meshwith 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 #59880
studiogijsCustomerThanks 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 #59882kdv
ParticipantI 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 #59923
Alexander 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 #59938
studiogijsCustomerI 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.
