Its is possible, to Add Rigidbodies to an object and interact in Augmented Reality with the image target through the cell phone camera?
Rigidbodies and Vuforia
Hi, Alessandro I nearly tried every answers to the "fall through" problem in this community, no one work for me. Even though yours is so reasonable and i am sure it is the detecting and frame updating problems, the ball still fall through the collider. As Vuforia has updated, have you found a solution to "objects fall through plain or box collider cubes". ps. setting on rigidbody works fine in unity without adding vuforia.
Rigidbodies and Vuforia
The best would be to prevent the objects from falling, by setting "Is Kinematic" to true (which disables the effects of gravity on the objects) until at least one target has been detected.
Then, once the first target has been detected you can disable "Is Kinematic" and let the objects fall under the effects of gravity.
There are probably also other ways around this, but the basic idea is to disable physics until a target has not been detected.
Rigidbodies and Vuforia
i put the rigid objects slightly above the plane so that i have time to detect the marker before they fall to oblivion. is there a way around this? say something like pausing the scene in unity when the marker is not found? ...complete noob here
Rigidbodies and Vuforia
you should use Box colliders attached to yur Image Targets; if the size (scale) of the box colliders is adjusted to meet the size of the targets, then the collision should work OK.
Note: the "thickness" of the box colliders should be small, as the image targets (or frame markers) are 2D planes.
Note however, that if a target/marker is not detected/tracked by Vuforia in the current frame (despite it being in the camera view), there will be no Trackable and therefore no collider for the target in the frame; so, this may result in the "fall through" effect (as you see the marker in the camera video view, but it is not detected so it does not exist in the Unity virtual world at that moment).
Rigidbodies and Vuforia
I am new to Unity and I am having some trouble implementing the physics effect I have working in my game to the Vuforia plugin.
I have a basic brick shooter game set up in which I knock down a wall of boxes. All the physics work fine on my main camera; however once I set it up with the AR camera, any with object with a rigidbody falls through the image target even though they have colliders.
Is there anyway I can do this without restricting the interaction through isKinematic, unchecking Gravity or Freezing transformations on the Y-Axis?
I've tried adding colliders on the Image target and putting planes on top as well. Still any object with a rigidbody falls through. What am I doing incorrectly?
Hi David, Hope you had a good
Hope you had a good holiday.
Thanks for the link, my floor is actually just a collider though, it has no rigid body and therefore no isKinematic setting. Also, my stacks of objects behave just fine when run in a standard scene.
I started out with image targets but actually switched to frame markers due to performance considerations (I was hoping it may improve battery usage) but I'm pretty sure it is just changes in the pose that are causing it (like building a Jenga tower on a wobbly table) so I may give ITs another try if it produces better results.
When I find a bit of time I can probably put together an example scene with the issues I am having if that would be of interest? I had been meaning to do so but Christams got in the way!
This thread seems to describe
This thread seems to describe a similar issue - http://answers.unity3d.com/questions/119114/why-are-my-stack-of-cubes-vibrating-creeping-and-p.html
Is your base collider set to isKinematic?
The precision of the tracker's pose estimation does decrease as you get further away from the center of the target, but this propagates linearly and uniformly for the augmentation - i.e. the contituent models shouldn't be jittering independently.
Also have you tried augmenting a strong ImageTarget? - a good IT will provide more robust tracking than a FrameMarker.
Hi David, First off I should
First off I should add the disclaimer that this could be entirely down to something silly I am doing! I built a pyramid of rigib body 'bricks' in this sort of formation like this:
then added the structure as a child to a framemarker. I'm not actually seeing any large movements (since applying the low pass filter described elsewhere) but the wall will slowly shift and fall apart, like an accumulation of lots of tiny movements. I did try changing the mass of each brick from 1 to 100, this did seem to help a little but didn't eliminate the issue entirely.
Something else worth noting
Something else worth noting for anyone else looking to add RBs to their scene that they want be static the vast majority of the time:
One of the issues I have run into is the fact that objects jitter due to (amongst other things) the camera movement - there are suggested solutions fo this elswhere on the forums. As well as those solutions I have found it necesary to force the rigid bodies to sleep if their velocity is under a cetain threshold, otherwise they will continuosly react to the movement of the collider they are sat on (which will be jittering) and gradually move over time.
It is an ugly solution and I would welcome alternatives if anyone has one but that
Hi gringofx, I don't know
I don't know exactly what it is you are trying to do but the short answer is yes. Your phones screen is essentially just the camera that provides the view into your world like with any 3D scene. Like Nalin pointed out you will want to use either AUTO or USER world center mode. If you are using Unity it provides everything you need.
Thanks Nalin, I think I am
Thanks Nalin, I think I am good to go. All I am after is a fixed frame of reference, just using the cards for initial placement and setup, I don't plan to move them after that, I plan for the user to interact with the scene via their device.
From the dev guide, which explains it far better than I can:
World Center mode:
- If set to USER, you can set up a single target as the world center. This target never moves in the scene; instead, the camera and all other targets move in relation to it, as long as it is visible.
- If set to AUTO, the first visible target is selected to be the world center.
- If set to NONE, the camera is fixed in place and all targets move in relation to it.
So when I tested the sample ball on paper scene with USER mode and the world center set to the image target, the ball does not move which is probably because the target is the world center. What I have not yet had time to try is whether changing the orientation of the target could yield a different orientation in the pose matrix (I think this is unlikely). If by some means it could, then one could use this to apply a force/torque to the ball and get it to move.
Steffan posted some other ideas here: https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/tilting-scene-unity
..so this is worth checking out, and I do need to dig out this project to investigate a little further.
I am keen to see a demo like this so let me know if you make any progress here :)
Thanks for the quick reply
Thanks for the quick reply Nalin,
I would consider myself a competent developer but a Unity novice so hopefully I will get there in the end!
I assumed there were going to be some issues with frames of reference. That thread was useful. So my understanding is now this, when set to NONE the camera position (as setup in the scene) relative to the target determines the frame of reference. USER and AUTO are basically the same except for USER it is a specific target image and for AUTO it is the first target image found. So in theory either USER or AUTO could be used as long as the code is altered accordingly?
Basically you can do anything in Unity and it should work alongside Vuforia.
When I say "coded correctly" bascially I mean that a competent Unity developer should be able to achieve more or less anything, which is the beauty of the integration. There are a few gotchas such as World Center Mode that you need to be aware of with rigid bodies,
check this thread for more info https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/moving-object-tilting-image-target
...and you may need to experiment a little to get the right effect.
If you have any problems, then we are here to help :)
HI Nalin, Just to clarify,
Just to clarify, when you say 'coded correctly' do you just mean that provided I am doing te right thing in Unity I shouldn't need to start messing with any of the Vuforia native code?
For example, if I wanted to use one marker to place a set of bowling pins and andother to place a bowling ball and tapping on the ball fired it at the pins and they used rigid bodies to interact. This should all be possible by simply installing the Unity plugin and working just on the unity side?
Great job by the way guys, I was up and running in no time, multiple image targets, models modifying object through player input etc - just haven't figured the rigid bodies stuff yet and wanted to check if there was anything to consider on the Vuforia side.
Are you sure you want to delete this message?
Are you sure you want to delete this conversation?