Forum rules - please read before posting.

Touch screen camera issue

edited September 2014 in Technical Q&A
Hey Chris. 
It's been a while but I'm creating something new on iOS and I'm encountering a frustrating issue. I have a first person player and I'm using touchscreen input with drag for rotation. I tap hotspots and my player moves to markers to navigate around my scene. 

The issue is, when dragging to rotate the camera, it works fine until I lift my finger up off to the screen. Once I take my finger off of the screen, the camera continues to rotate infinitely until I tap the screen again to stop it. 

If I leave the controls as Mouse and Keyboard, and start with the cursor locked, the dragging works exactly as I want it to on the touchscreen, however I can't interact with menus, inventory, etc. 

Is this dragging rotation thing a bug or is there a way to make it behave like I want it to? (Like moving my finger for mouse look and having it immediately stop when I lift my finger?)

I hope that made sense. 

I would really appreciate a response.

Thanks!

Comments

  • Ok, I think MAYBE the easiest solution is for me to merge cursor locked and unlocked modes when using a touchscreen device with mouse and keyboard controls defined, because the touchscreen mode is not working for this situation. I want to be able to free look by dragging my finger and also be able to touch activate the menu or open inventory when I touch it.

    Any suggestions on the best way to go about doing this?
  • Well, let's look at the first question, first - because that indeed sounds like a bug!  It shouldn't be necessary to merge the cursor modes, because you should be able to play it "unlocked" the whole time.

    Please post a shot of your (desired) Settings Manager and FirstPersonCamera script's Inspector.  With luck and good timing, I can hopefully get this sorted out before 1.39's release.
  • Thanks Chris. I'l be working all day on this and reply ASAP. 
  • Ultimately, what I'm trying to achieve is for the camera to function on a touchscreen, exactly how it does when I build to my iphone with the mouse and keyboard setup, with the cursor locked, and still be able to touch the menu button, etc.  Thanks for your help.
  • Thanks for the info.  First of all, you ought to remove the "GameCamera" script from the First Person Camera, as this may cause conflict.

    I believe I've solved your "runaway camera" issue when using Touch Screen mode, but I'm not clear what's wrong beyond that - simply that it "behaves differently from mouselook movement".  Different in what way?  There is a difference in that it's using Touch-specific code - have you tried varying the "Freelook speed" within the Settings Manager.
  • Thanks Chris, I removed the GameCamera script as you suggested. No improvement,  As far as behaving differently, maybe it just seems that was because of the runaway movement issue.

  • Best wait for 1.39, in that case, and we'll revisit this next week.  1.39 should be out tomorrow afternoon, all being well.
  • Your new update fixed this issue! Thanks for your continued work on AC Chris!! :D
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.