CN104636063B - 电子屏幕虚拟摇杆的构建方法 - Google Patents
电子屏幕虚拟摇杆的构建方法 Download PDFInfo
- Publication number
- CN104636063B CN104636063B CN201510033903.4A CN201510033903A CN104636063B CN 104636063 B CN104636063 B CN 104636063B CN 201510033903 A CN201510033903 A CN 201510033903A CN 104636063 B CN104636063 B CN 104636063B
- Authority
- CN
- China
- Prior art keywords
- rocking bar
- finger
- virtual rocking
- touch screen
- distance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04808—Several contacts: gestures triggering a specific function, e.g. scrolling, zooming, right-click, when the user establishes several contacts with the surface simultaneously; e.g. using several fingers or a combination of fingers and pen
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Position Input By Displaying (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本发明涉及一种电子屏幕虚拟摇杆的构建方法。本发明通过获取用户在多点触摸终端的触屏上的操作来确定操作按钮的初始位置,然后根据所述操作的移动方向来控制操作按钮的位置,使触摸点始终处于操作按钮的控制区域内,从而通过在多点触摸屏上实现操作按钮跟随操作位置移动的方案提高操作的准确性,避免操作缺失。支持用户进行更为准确的人机交互,操作移动过程更为流畅,减少误操作。
Description
技术领域
本发明涉及一种电子屏幕虚拟摇杆的构建方法。
背景技术
虚拟摇杆是指通过手指滑动屏幕的方式实现摇杆功能,多见于格斗游戏和FPS游戏。
目前常见的虚拟摇杆底盘为一个固定的区域,手指在电子屏幕上摇动幅度过大时会超出底盘的固定区域,同时超出设备感应范围,造成操作的难以到位或缺失,造成操作体感较差。
发明内容
针对上述现有技术的不足,本发明的虚拟摇杆并没有采用固定区域,摇杆底盘可跟随摇杆移动。具体操作时,手指触摸点移动到电子屏幕的某个位置,虚拟摇杆就会跟随到那个位置,更加方面操作,解决了超出底盘控制区域之后的失灵现象。非固定的摇杆底盘在一定程度上解决了误操作的问题。
本发明的技术方案如下:
电子屏幕虚拟摇杆的构建方法,包括以下步骤:
步骤一,
获取用户在多点触摸终端的触屏上的操作:
当手指位于触摸屏上方的距离在预设距离门限内,且所述手指的停留时间大于预设时间门限时,读取所述手指所在位置一的坐标值;获取触摸屏上与所述坐标值对应的预设区域,并对所述预设区域内的显示单位进行特效显示,所述显示单位包含一个逻辑中心点和一个底盘,该逻辑中心点为虚拟摇杆的中心;
步骤二,
当手指移动时,首先判断手指是否在触摸屏上方的预设距离门限内,如果是,则读取触摸屏上手指移动后的位置二的坐标值,结合位置一的坐标值,计算出移动距离,并对移动距离进行数值判断,如果移动距离超出底盘半径,则在位置二显示逻辑中心点,如果移动距离在底盘半径之内,则在位置一显示位置中心点,该移动距离解释为游戏角色的行进指令;
如果超出距离门限,则显示单位消失。
与现有技术相比,本发明通过获取用户在多点触摸终端的触屏上的操作来确定操作按钮的初始位置,然后根据所述操作的移动方向来控制操作按钮的位置,使触摸点始终处于操作按钮的控制区域内,从而通过在多点触摸屏上实现操作按钮跟随操作位置移动的方案提高操作的准确性,避免操作缺失。支持用户进行更为准确的人机交互,操作移动过程更为流畅,减少误操作。
具体实施方式
在角色游戏中,需要虚拟摇杆进行游戏角色的进退。
当手指移动时,根据操作系统给出的触摸点的新坐标,结合上一次手指所在的坐标位置,计算出移动轨迹,根据计算出的移动轨迹移动屏幕上的虚拟摇杆,保证虚拟摇杆始终在手指附近。
虚拟摇杆移动以后,需要重置虚拟摇杆的逻辑中心点,如果此时手指在触屏上的坐标和虚拟摇杆新的逻辑中心点的距离依然大于距离限制,则继续按照以上的规则移动虚拟摇杆。
当虚拟摇杆的中心点和手指触屏坐标的距离小于距离限制门,则停止移动虚拟摇杆。此时手指相对于虚拟摇杆逻辑中心的位移向量就解释为游戏角色应该行进的方向。
当所述用户停止触摸所述触屏,即触摸点消失,隐藏操作按钮,等待下次操作。
在调整所述按钮位置过程中,基于所述操作当前位置同步显示调整后的操作按钮。
而且,本发明还可以当所述用户停止触摸所述触屏时,隐藏所述操作按钮,从而使得界面更加友好,提高了人机交互效率并提升用户的使用体验。
Claims (1)
1.电子屏幕虚拟摇杆的构建方法,包括以下步骤:
步骤一,
获取用户在多点触摸终端的触屏上的操作:
当手指位于触摸屏上方的距离在预设距离门限内,且所述手指的停留时间大于预设时间门限时,读取所述手指所在位置一的坐标值;
获取触摸屏上与所述坐标值对应的第一预设区域,并对所述第一预设区域内的第一显示单位进行特效显示,显示第一虚拟摇杆;
其中,显示单位包含一个逻辑中心点和一个底盘,该逻辑中心点为虚拟摇杆的中心位置;
步骤二,当手指移动时,首先判断手指是否在触摸屏上方的预设距离门限内,如果是,则读取触摸屏上手指移动后的位置二的坐标值,结合位置一的坐标值,计算出移动距离,并对移动距离进行数值判断;
如果移动距离超出底盘半径,则在位置二显示第二逻辑中心点,并在该逻辑中心点所在的第二预设区域内的显示单位进行特效显示,形成新的第二虚拟摇杆;
如果移动距离在底盘半径之内,则继续在位置一显示第一虚拟摇杆,该移动距离解释为游戏角色应该行进的方向;
步骤三,
如果超出距离门限,则显示单位消失。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510033903.4A CN104636063B (zh) | 2015-01-22 | 2015-01-22 | 电子屏幕虚拟摇杆的构建方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510033903.4A CN104636063B (zh) | 2015-01-22 | 2015-01-22 | 电子屏幕虚拟摇杆的构建方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104636063A CN104636063A (zh) | 2015-05-20 |
CN104636063B true CN104636063B (zh) | 2018-10-12 |
Family
ID=53214877
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510033903.4A Active CN104636063B (zh) | 2015-01-22 | 2015-01-22 | 电子屏幕虚拟摇杆的构建方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104636063B (zh) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105327506B (zh) * | 2015-10-14 | 2019-10-29 | 网易(杭州)网络有限公司 | 一种游戏角色控制方法及装置 |
CN105867765B (zh) * | 2016-03-25 | 2018-11-20 | 网易(杭州)网络有限公司 | 对于触控虚拟控件的反馈方法、系统及移动终端 |
CN106502563B (zh) * | 2016-10-19 | 2020-03-06 | 北京蜜柚时尚科技有限公司 | 一种游戏控制方法及装置 |
CN106354418B (zh) * | 2016-11-16 | 2019-07-09 | 腾讯科技(深圳)有限公司 | 一种基于触摸屏的操控方法和装置 |
CN106598465A (zh) * | 2016-12-20 | 2017-04-26 | 上海逗屋网络科技有限公司 | 基于虚拟摇杆的控制方法、装置和设备 |
CN106951178A (zh) * | 2017-05-11 | 2017-07-14 | 天津卓越互娱科技有限公司 | 一种控制游戏角色移动的方法及系统 |
CN107391000B (zh) * | 2017-06-09 | 2022-08-05 | 网易(杭州)网络有限公司 | 信息处理方法及装置、存储介质、电子设备 |
CN108815843B (zh) * | 2018-05-24 | 2022-04-08 | 网易(杭州)网络有限公司 | 虚拟摇杆的控制方法与装置 |
CN108874141B (zh) * | 2018-06-25 | 2021-03-30 | 京东数字科技控股有限公司 | 一种体感浏览方法和装置 |
CN113093973B (zh) * | 2019-12-23 | 2023-09-26 | 鹤壁天海电子信息系统有限公司 | 一种移动终端的操作方法、存储介质及移动终端 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102266672A (zh) * | 2010-03-11 | 2011-12-07 | 鹦鹉股份有限公司 | 一种远程控制无人驾驶飞机、尤其是旋翼无人驾驶飞机的方法和装置 |
CN104063102A (zh) * | 2014-06-04 | 2014-09-24 | 小米科技有限责任公司 | 识别悬浮操作的方法及装置 |
CN104076986A (zh) * | 2014-07-25 | 2014-10-01 | 上海逗屋网络科技有限公司 | 一种用于多点触摸终端的触摸控制方法与设备 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8381135B2 (en) * | 2004-07-30 | 2013-02-19 | Apple Inc. | Proximity detector in handheld device |
US20110175826A1 (en) * | 2010-01-15 | 2011-07-21 | Bradford Allen Moore | Automatically Displaying and Hiding an On-screen Keyboard |
KR101913817B1 (ko) * | 2012-08-29 | 2018-10-31 | 삼성전자주식회사 | 터치스크린 입력 처리 방법 및 장치 |
CN103092412B (zh) * | 2013-01-14 | 2016-08-03 | 东莞宇龙通信科技有限公司 | 移动终端和移动终端操作对象的显示方法 |
CN103336534A (zh) * | 2013-06-07 | 2013-10-02 | 浙江宇视科技有限公司 | 一种在监控终端的触摸屏上进行云台摄像机控制的方法 |
CN104267904A (zh) * | 2014-09-26 | 2015-01-07 | 深圳市睿德网络科技有限公司 | 一种具有触摸屏虚拟单位控制的方法及移动终端 |
-
2015
- 2015-01-22 CN CN201510033903.4A patent/CN104636063B/zh active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102266672A (zh) * | 2010-03-11 | 2011-12-07 | 鹦鹉股份有限公司 | 一种远程控制无人驾驶飞机、尤其是旋翼无人驾驶飞机的方法和装置 |
CN104063102A (zh) * | 2014-06-04 | 2014-09-24 | 小米科技有限责任公司 | 识别悬浮操作的方法及装置 |
CN104076986A (zh) * | 2014-07-25 | 2014-10-01 | 上海逗屋网络科技有限公司 | 一种用于多点触摸终端的触摸控制方法与设备 |
Non-Patent Citations (1)
Title |
---|
cocos2d-x的初步学习十二之虚拟摇杆Joystick;wang_daren;《http://blog.csdn.net/kuloveyouwei/article/details/9101833》;20130615;第1-6页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104636063A (zh) | 2015-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104636063B (zh) | 电子屏幕虚拟摇杆的构建方法 | |
CN106155553B (zh) | 虚拟对象运动控制方法及装置 | |
JP7150108B2 (ja) | ゲームプログラム、情報処理装置、情報処理システム、および、ゲーム処理方法 | |
US9772743B1 (en) | Implementation of a movable control pad on a touch enabled device | |
US20170291110A1 (en) | Game control program, game control method, and game control device | |
KR101582296B1 (ko) | 모바일 게임을 위한 자동 조준 시스템 및 방법 | |
CN105194871A (zh) | 一种控制游戏角色的方法 | |
JP2023089287A (ja) | ゲームプログラム、情報処理装置、情報処理システム、および、ゲーム処理方法 | |
CN108579077B (zh) | 信息处理方法、装置、存储介质及电子设备 | |
CN105630341A (zh) | 触控显示装置、触控显示方法及无人机 | |
JP2016539441A (ja) | 再生調節方法および装置 | |
CN102681754A (zh) | 信息处理设备和信息处理方法 | |
JP2022511837A (ja) | アクション実行方法、アクション実行装置、コンピュータプログラム及び電子装置 | |
JP2011145779A5 (zh) | ||
CN109491579A (zh) | 对虚拟对象进行操控的方法和装置 | |
JP2013083553A5 (zh) | ||
CN105138136A (zh) | 手势识别装置、手势识别方法及手势识别系统 | |
JP2019187801A (ja) | ゲーム制御装置、ゲームシステム、及びプログラム | |
CN102750032B (zh) | 一种控制器及触控操作方法 | |
CN103472986B (zh) | 触摸滑动操作自适应控制方法、装置及触摸板 | |
CN108376030B (zh) | 一种电子设备的控制方法、装置和电子设备 | |
US20180221766A1 (en) | Control method of controlling game handle supporting android game | |
CN103870176A (zh) | 一种控制方法及电子设备 | |
US10078410B1 (en) | System to locomote an entity in three dimensional space | |
Cuaresma et al. | A comparison between tilt-input and facial tracking as input methods for mobile games |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20150520 Assignee: Hangzhou spoon Network Technology Co., Ltd Assignor: Hangzhou dianhun Network Technology Co., Ltd Contract record no.: X2021330000727 Denomination of invention: Construction method of electronic screen virtual rocker Granted publication date: 20181012 License type: Common License Record date: 20211109 |
|
EE01 | Entry into force of recordation of patent licensing contract |