How to collide AR objects with real world? - android

I am using ARCore Android SDK with Kotlin. I'd like to place an object and let the gravitation do its work. So basically if I place something in the air I want them to fall to the ground. I am working with a GLSurfaceView since Sceneform SDK is deprecated. Do you have any solution to make it happen? I imported also the library called 'jbullet' but couldn't make it do what I want.
With 'jbullet' I could only make RigidBody elements which will fall infinitely because they can't collide with the real world.

Related

its possible to use ARCore to make a complete augmented reality in android using the mostly C and NDK?

i'm new to use ARCore (and to android programming, as i mostly did desktop asm/C/Linux/Windows/RPi stuff), and i dont really like JAVA or anything that is forcefully object oriented (as in built-in OOP features, not the general OOP concept... i.e. its fine to use COM from C for example), so that said...
its possible to use ARCore to make a complete augmented reality for android using mostly C and NDK? like using next to nothing from the java side, to the point that once you do the initial skeleton to handle the UI events, everything else, capturing/rendering/management/etc... can be done from the C side?

Building graphics UI in Android NDK

I'm building an audio / music app. in Android. And because of this I'm using the new Oboe C++ library.
I'm wondering how people do graphics and UI in Android with NDK applications.
I don't think I need OpenGL or a low level, fast graphics library. This isn't a game. I really just need to pick up different touches in different locations / from some custom UI widgets. (But I do need multitouch).
Is there a convenient highish-level API for doing the drawing and picking up touches from C++? If so, what is it? Or would I be better doing all the UI in Java and just calling down to the NDK for the audio?
This is the first time I'm trying to work with Android NDK and the Oboe examples I've looked at don't really draw anything in C++. The one "hello world" example, uses Java widgets. And the others don't really draw anything on the screen at all.
To be clear, Multitouch events are handled and made available by the Java/Kotlin side of the Android Framework so you would need to pass those down through the JNI level. A reason to draw at the NDK layer is to reduce the latency of passing a result back up through the JNI layer to the Java/Kotlin layer which would have to update any widget/view.

Using PhysicsEditor to create unique bodies for collisions in box2d (AndEngine)

I've been developing a game recently and I would like to incorporate pixel perfect collisions (so it ignores the alpha part of the image)
After doing some research I was referred to using the software PhysicsEditor for you to create unique bodies to use in box2d:
http://www.codeandweb.com/physicseditor
the software itself is fine to use and I've got all .xml files ready to use and everything in my project set up
I've also been looking at the examples provided here:
https://github.com/ANDLABS-Git/AndEngine-PhysicsEditor-Extension-Examples/tree/master/src/org/andlabs/andengine/extension/physicsloader
My problem is I'm not entirely sure where to go from here to begin to detect collisions - I understand how basic box2d collisions work but I have no idea how to use anything created from PhysicsEditor
I'm very new to android programming so I don't quite understand how to use PhysicsEditor in my project and how to use what it's created as bodies that can be attached to sprites and such - (unless it's all included within the loader it's self?)
After I've used the loader (as seen in the example) - what do I do from here?
I can't seem to find any other examples of people using the PhysicsEditor with collisions in their project either so I'm stuck on what to do.
(I've also looked up other alternatives for perfect pixel collisions but they seem even more of a hassle to set up)
Any help would be appreciated and an example of a basic project using PhysicsEditor with collisions or some sort of tutorial for dummies would be ideal.
Thanks

Drawing a plot using System.Drawing Only

In my application in Windows Phone, i have made a custom plotting library for some simple plotting of a graph. I did this, using System.Windows.Shapes. Now i run to some problems when i want to use this on other platforms (android, and iphone, using mono).
So i came to the conclusion that i may need to remake te library using System.Drawing only. Because that namespace is available on all three platforms, and (if i have googled correctly) contains some functionally in drawing stuff on ui's.
My Questions
Am i correct in the fact that drawing contains drawing functions.. If so, how do i make a multi point line or polyLine?
Are there any (allready available) libraries that do the same using the System.Drawing namespace only?
If there are any plotting libraries that are available for only Android an MonoTouch than that will do aswell, because i've allready got a graph drawing function on my windowsphone, This will be my last resort. Because i want to keep the code behind the platforms mostly the same.
What i found out:
After some time put in to searching for an answer for this, i gave op hope to find libraries that implement a graph functionality for all the three platforms. There just doesn't seem to be one. There are libraries available for Silverlight and Monotouch(IOS) but, the silverlight part is NOT compatible with windows phone.
I found out that the library system.drawing does not have full functionality in silverlight, so after some careful consideration I also stepped away from that idea. And Moved towards making my own library that implements some #if (SILVERLIGHT) or #if (MONOTOUCH) region functionality.
At this point i have made my own library for WindowsPhone being able to draw a decent plain and simple graph. I eventualy done this using the System.Windows.Shapes namespace. Today i will start making the same sort of lib for android. And after that i will do it for windowsphone, The library will be open source, and when finished i think i will release it somewhere.
As a sort of summary: "there was not a real answer to my question, so
i had to work around it. This work around made me make my own cross
platform library
".

How to display AdMob ads in FlashBuilder 4.5.1 mobile project?

I am currently developing an application in the latest version of FlashBuilder and I cant seem to find out how I can incorporate AdMob ads or any other Ads into my application. Does anyone know how this can be done? There seen to be a few tutorials online focused on Flash however im not sure how to get those to work in the Flex environment. Thanks
Anything that works in AS3 will work in Flex (since Flex is built up on top of AS3) it's just going to be a matter of making sure you've included the appropriate swc dependencies in your project (or AS3 code if you're just copying it in). The only other thing to be aware of is that the Flex 3 framework requires that elements added to components are a UIComponent or sub-class thereof, since this object isn't present in the Flash player itself (it's part of the Flex framework code) you sometimes need to add the Sprite or MovieClip or whatever to a UIComponent then add that to your "page" or component. Please drop a URL to the code you're trying to integrate with and I'll edit this answer to include specifics.
Also to note I specified Flex 3 because in Flex 4 the requirement is that the component implements IVisualElement (and is added via addElement vs addChild).
Well, There are always the Adobe Docs that are a good reference (under "Displaying Ads"). They suggest using the StageWebView object viewport. But, Jespers tells you how to do the same thing, and mentions Rohde's wrapper class that makes the whole thing easier. Choose your favourite.

Categories

Resources