I want to rotate the camera like Minecraft | Android - c#

I want to swipe and turn the camera.
I reproduced the Maincraft in Windwos with Character 's First Person Controll.And how do you implement it on Android?I use joystick for the movement, but I want to swipe the rotation of the camera.What should I do?

Unity is a multiplatform game engine but you can't expect to create one game and run it everywhere. FPC have a desktop implementation and it's not intended to be used for mobile device. If you are interested in Android development I suggest you to take a look at Unity's Android SDK.

Related

Have phone rotation be camera rotation in Unity for Android?

How would one go about using the gyroscope, or whatever AR-magic or related tech Android provides, to have the phone rotation become the in-3D-scene-camera rotation? Basically, I have a scene in Unity/ C#, and when it runs on Android I want to have the user be able to view the scene as if the phone was the in-world camera, a bit like in VR. So if one rotates the phone leftways, for instance, one sees what is to the left in the 3d scene, as if one was standing inside it. Thanks!

How To Apply Bounds in Unity For iOS devices

I've made an unity game for iOS devices. It has a game object(sphere) which moves by the force applied to it. But I want to limit the sphere within the screen bounds.
I've seen the unity reference to Bounds, but i don't know how apply it according to the iOS device screens. Please Help.
ThankYou.
Use Mathf.clamp to keep your movement within the screen size. This will be more efficient than using colliders on the edges of your screen. Just play around with your object until you get the right numbers to keep it on your screen. Of course if you plan to use iOS tablets etc you will need to be able to account for the change in your clamping area.
Here is a link to the Unity Documentation which actually includes an example of what you are trying to do.
http://docs.unity3d.com/Documentation/ScriptReference/Mathf.Clamp.html

How to use vuforia on PC Application

i'm new on vuforia and i need some help with this topic.
Can someone tells me if its possible use vuforia with a webcam on a pc application?
I got webcam frames on a plane texture and i tried to pass those textures to vuforia but i have not got it work.
I used WebCamTexture to get frames of webcam.
I'm not familiar with Vuforia (although it looks interesting, I'm going to try that out myself this weekend!), I might have a suggestion.
Is it possible Vuforia doesn't know what to do because of the images being WebCamTexture instead of something like Texture2d?
WebCamTexture is a Texture (Texture2D, WebCamTexture, RenderTexture all extend from Texture but they aren't exchangeable).
So, try to convert your texture and pass that on to Vuforia?
var tx2d = new Texture2D();
tx2d.SetPixels((go.renderer.material.mainTexture as WebCamTexture).GetPixels());
EDIT: What I found here, under the section Running in the editor:
There is a specific Web Cam Behaviour script.
To use Play Mode for Vuforia in Unity Pro, simply select the attached,
or built-in, webcam that you want to use from the Camera Device menu,
and then activate Play Mode using the Play button at the top of the
Editor UI.
You can also use the standard Unity Play Mode with non-Pro Unity
versions and by setting ‘Don’t use for Play Mode’ in the Web Cam
Behaviour component.
To use standard Play Mode, adjust the transform of the ARCamera object
to get your entire scene in view, and then run the application in the
Unity editor. There is no live camera image or tracking in standard
Play Mode, instead all Targets are assumed to be visible. This allows
you to test the non-AR components of your application, such as scripts
and animations, without having to deploy to the device each time.
Have you tried the $250 plugin at http://holographi.space/ ? I haven't paid $250 for it yet.

Interacting with avatar using Kinect and Unity

I want to move the avatar based on the movement the player using kinect and Unity, are there any good tutorials?
We are using unity and Kinect interface to create a simple application. Based on the movement of the player we need to move the avatar.
We are supposed to use Unity with GAKUNITY, No OpenNI or any third party tools.
Are there any good tutorials for GakUnity with Kinect?
GAK means Gadget Accelerator Kit
We just want to move any avatar with player movement in front of kinect interface. Even help in hand movement also highly appreciated.
You can also share useful links or books regarding to unity and kinect programming.
Custom Kinect Gesture Recognition using OpenNI and Unity3Dkinect.dashhacks.com
A tipster has tipped a lil tipple my way in the form of custom gesture recognition for the Kinect using OpenNI and Unity 3D. What this allows you to do is create you own custom gesture that are recognized by the kinect through the software interface.
Unity and Kinect tutorialnightmarekitty.com
For this chapter, we are going to be using a very popular game engine called Unity. By integrating OpenNI, Nite and Sensor Kinect into Unity we will control a 3d character and multiple user interfaces. After we cover the main Components, we will build an example of each from the bottom up.
Kinect Wrapper Example Projectwiki.etc.cmu.edu
This scene shows you how a skeleton is generated / tracked by placing spheres at each of the bones tracked by the Kinect, and how to use kinect to control your model. Use this to get a feel for what the Kinect is capable of. It also shows you how to prepare your GameObjects
I am not familiar with Unity 3d,but you can try using kinect with XNA. At the latest version of Kinect for windows SDK 1.5 and Developer Tookit 1.5.1,there is a sample demonstrating how to interact with 3d avatar using Kinect and XNA,you can find more information on http://msdn.microsoft.com/en-us/library/jj131041
I have no idea about GAKUNity, but you can use zigfu plugin for unity3d and do your project. It has got sample codes and character which you can use for reference, and the sample codes are commented nicely .
You can just import your bone, drag your bones on the zigskeleton script . just read through th zig skeleton script and you will understand the function and structures they are using.
And you can even refer the MEET THE KINECT book, they have explained about using zigfu in unity .

Simulate/Emulate Xbox Controller in C++ or C#

I have a cooperative PC game, but the second player need Xbox joystick to play. Well i don't have Xbox Controller i have some other 10 buck piece of shit joystick and the game don't recognize him.
So i tried different programs to emulate any joystick to XBox joystick, but because mine is cheap the program wont recognize it too.
So i want try to create a program which Simulate XBox joystick inputs.
Then i will capture mine joystick clicks and send the Xbox simulated one. I know how to capture mine joystick clicks i have done that already.
The question is simple - How to send XBox360 Controller inputs to my PC?
If you're forced to use XBOX Controller, i assume you're using XNA
If that's the case, you could try this Wrapper:
http://sourceforge.net/projects/xnadirectinput/

Categories