Alternative of touchesMoved in Unity3D

Posted by Arman on Stack Overflow See other posts from Stack Overflow or by Arman
Published on 2010-12-29T05:27:18Z Indexed on 2010/12/29 6:54 UTC
Read the original article Hit count: 368

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [[event allTouches] anyObject];
    CGPoint location = [touch locationInView:touch.view];
    CGPoint xLocation = CGPointMake(location.x,racquet_yellow.center.y);
    racquet_yellow.center = xLocation;
}

The above event move recquet_yellow(UIImageView) with mouse pointer, or when I move thumb on iPhone screen, I have 3D Object in Unity3D how can I move my object like recquet_yellow. Kindly guide me.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk-4.0