Move the camera around
Hello,
I want to achive a way to move the camera by moving finger around the screen. It's pretty simple, but I have one problem - now when player touch the screen to move the camera around, he can accidentally hit the hotspot, and perform an action (for example start a dialogue).
Could anyone help me with this?
Thank you!
I want to achive a way to move the camera by moving finger around the screen. It's pretty simple, but I have one problem - now when player touch the screen to move the camera around, he can accidentally hit the hotspot, and perform an action (for example start a dialogue).
Could anyone help me with this?
Thank you!
Comments
Cheers sorry if im to late
Actor prototypes do NOT have access to the camera, but Actor Instances in the Scene DO have access to the camera.
Make a new Actor called something like CameraController. Just a simple box will work. Don't put any code in the prototype. Drag the CameraController into the Scene and place it just outside of view.
Double-click on it to open its properties and click on the padlock to access its behaviors. This actor now has access to the Camera data. Specifically the Camera.Origin.X and Y (which are the lower left coords of the viewing area at all times.
You could try Constraining those coordinates to your Touch X and Y with an offset when you touch the screen.
---
Another option is to use the Control Camera behavior on an Actor. When you touch the screen, spawn an actor with that behavior in it. When you release, destroy the actor.
Really no need to bump an old thread like this unless you have the same issue. His question a I read it was not how to control the camera but how to keep your swipe from activing a button or hotspot.
The best answer I can think of would be make all of the touches require the camera controller velocity x and y be down around 0
Yet again I would expect since he never bumped the thread him self or asked again that it needed to be bumped now unless you had the same question.
Thanks
Aaron