I need to display cube in iphone which can be rotated and when touched on any side it should display which side has been touched
Here is the link for the demo example for cocos3d
You Can Use touches method instead of the accelerometer
Related
i want to make an area in my game where i can get touch inputs from the player.
Now i get touch from all the way of the screen.
strong textI want to get from the buttom of the screen or so.
You can make an invisible UI element or GameObject and on there check if it was clicked or not. You can do this with either https://docs.unity3d.com/2018.1/Documentation/ScriptReference/EventSystems.IPointerClickHandler.html or https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseDown.html
I need help implementing controls to move a SceneKit sphere. I want to have the user touch on the screen and when they move their finger around, the ball will move relative to the position of the user's finger. I don't want the y to increase or decrease I just want x and z, almost like a hula hoop.
I think you can use the GameController Framework seen Apple have released the WWDC Demo 'Fox', and it use GameController to control the character.
I want to detect movement of an object in iOS camera. Actually I am working on a project where the iOS camera is placed some where and when it detects any movement on the camera screen then it gives notification or fire any particular event.
Please suggest if how can I achieve the same.
I'd like to design a 3d cube, each side of the cube can have a different bitmap image (.png) the cube can be rotated using the finger touches (Up, Down, left, right) double clicking with your finger will return an integer value 1,2,3,4,5 or 6 corresponding to the currently showing surface. I'd also be using the pinch touch methods for fold / unfold feature.
Question is I'm not convinced that using open GL is the right choice. I'm not too savvy using it and am thinking is there a more simple way to do this. If there is any tutorial code hanging around it would be extremely helpful.
Thanks.
I suggest you check out ISGL3d and cocos3d
I have an image of a bottle, whenever user shakes the device i want to move that image in that direction.
like up, down, left or right.
For example: if user is shaking the device in left direction i want to move that image in left direction.
i can detect shake event using
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if(event.subtype==UIEventSubtypeMotionShake)
{/*some code*/} }
but i dont know how to detect the direction.
i dont even if this is possible or not.
please help me.
A shake is typically a back and forth movement. Use the accelerometer data to detect a sudden movement in one particular direction (e.g. left) or a tilt towards a different orientation.
You can get user motion values using CMMotionManager class.Please refer the following link
http://developer.apple.com/library/ios/#documentation/CoreMotion/Reference/CMMotionManager_Class/Reference/Reference.html#//apple_ref/occ/cl/CMMotionManager
Filter your acceleration and gyro dat detect direction of motion.