#visual scripting to scrpt

1 messages · Page 1 of 1 (latest)

rain creek
#

Hello. I want touch drag input in my game.
https://youtu.be/HYpP1kJPEZA
So i watched this video's last part. He teaches us what to do but through visual scripting. Can anybody please change this to actual script? Or can give me some other idea to implement touch drag controls

#

I also watched this:

#

But it only works in simulator mode. Is there any way it could work in game view?

south dome
#

I think you could do this without a turtorial. You can figure out how the mouse position has changed, and if the x is greater swipe to the right, and if the x is less then swipe to the left. But if you really need a tutorial: https://gamedevacademy.org/mobile-swipe-movement-tutorial/#Swipe_Detection_-_Part_1

GameDev Academy

https://youtu.be/ZKTs1DYCEDI You can access the full course here: Build a Mobile Road Crossing Game
Player Setup
In this lesson, we're going to be setting up a Player GameObject*; this is go

#

(Also this was like the 5th result on google so I think you could’ve found something that worked by your self)

rain creek
#

I just got to know that we can access touch swipe in only simulator mode

south dome
#

do you mean simulating the game on a mobile device?

rain creek
#

But in simulator mode we have to select a particular device

south dome
#

So whats the problem with it only working in simulator mode?

rain creek
#

So now my question is that if we build the game with the simulator mode, will it work on all devices

#

?

south dome
rain creek
#

Ok because if we switch the device name in Simulator, the camera ratio changes

#

And the game does not fit in all

south dome
#

that is the tricky thing with mobile games, you have to support all screen sizes

#

is it just the UI elements that do not fit?

rain creek
#

Yes so any idea how i can fit all screen sizes?

#

No the entire game does not fit

south dome
#

could you send some screen shots so I could see exactly how its not fitting?

rain creek
#

If the camera shows -2.5 till 2.5 on the x axis on iphone 11, it will fit between on -1 till 1 on the x axis on iphone 11 pro max

#

Just an example

rain creek
south dome
#

thats fine, no rush

rain creek
#

I have closed it bexcause of exams....

south dome
#

Just when you can is fine. It would help to see exactly whats wrong is all

rain creek
#

Ok

#

But can i switch platform to Android, add the above script (that uses simulator mode), and build the game in the Game mode with the ratio of 16:9 portrait, it shall work on all android devices, right?

#

Because simulator mode just represents mobile screen

#

So through above procedure, it will first fit on all screen sizes, and because of the script using touch screens, it will work on mobile

#

Ithink

#

I could do that first after my exams and then i can inform you if it works

#

Thanks @south dome

south dome
south dome