Touch only the object ..who?

sorry if I weird or stupid questions …
but I can not just put this code. it would add to an object, only that the rewind takes it across the screen, but I will only touch the object (cube) and not the whole screen. What should I add in the code to touch only the object?

thanks

function Update () { 
     for(touch in iPhoneInput.touches)
     { animation.Rewind();} 
    
}

help please

Check the touch location and verify that it’s over the object of interest (as opposed to now you just take any ol’ touch as good enough). I’m not sure if they’ll help directly but you might check out the example projects we have posted in the Resources area as they demo various input techniques:

Unity iPhone Examples

thanks …

:wink: :wink:

Look at either ray casting or use of colliders (box, not mesh) to detect clicks on objects in particular.

which project?

Look in the documentation.