CN105068706B - A kind of the sliding forward method and device of shooting game - Google Patents

A kind of the sliding forward method and device of shooting game Download PDF

Info

Publication number
CN105068706B
CN105068706B CN201510471135.0A CN201510471135A CN105068706B CN 105068706 B CN105068706 B CN 105068706B CN 201510471135 A CN201510471135 A CN 201510471135A CN 105068706 B CN105068706 B CN 105068706B
Authority
CN
China
Prior art keywords
touch screen
sliding
virtual camera
pressing
module
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
Application number
CN201510471135.0A
Other languages
Chinese (zh)
Other versions
CN105068706A (en
Inventor
张维谦
胡亚辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mobile Games Entertainment Technology (Guangzhou) Co.,Ltd.
Original Assignee
Guangzhou Travel Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Travel Network Technology Co Ltd filed Critical Guangzhou Travel Network Technology Co Ltd
Priority to CN201510471135.0A priority Critical patent/CN105068706B/en
Publication of CN105068706A publication Critical patent/CN105068706A/en
Application granted granted Critical
Publication of CN105068706B publication Critical patent/CN105068706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Position Input By Displaying (AREA)

Abstract

The present invention relates to a kind of sliding forward methods of shooting game, are applied to the mobile terminal with touch display screen, include the following steps, positioning step, when mobile terminal is in interface, if detecting, the right side of touch screen has pressing operation, records the position of current press touch screen;Judgment step presses the operation that horizontally slips when described, then executes sliding and turn to step, then executes click steering step when the pressing disappears;Sliding turns to step, sliding distance and glide direction in X-axis is calculated according to the position of the position of this pressing touch screen and last pressing touch screen, so that the virtual camera rotates to the left and to the right relative to the display screen of mobile terminal;It clicks and turns to step, drive the center rotation of virtual camera to the position of current press touch screen.The invention also includes a kind of sliding steerings of shooting game.The present invention can facilitate virtual camera to carry out sliding steering, while can effectively improve game experiencing degree.

Description

A kind of the sliding forward method and device of shooting game
Technical field
The present invention relates to the sliding steering technique in a kind of moving game more particularly to penetrating in a kind of mobile touch screen terminal Hit the sliding forward method and device of game.
Background technique
Moving game be a kind of user by mobile communication network in platforms such as mobile touch screen terminals such as mobile phone, tablet computer The electronic game business of upper operation comprising chess/card game, role play, strategy game, action game etc..Shooting game conduct One of action game, it, which aim at by virtual camera, at present turns to shooting, the realization of the steering of virtual camera Usually using following scheme, if the FPS (such as modern war series) and TPS of the mainstream in present mobile touch screen terminal are (such as fire Line series) scheme that rocking bar operates is all employed, this scheme is exactly that a control target movement is simulated on touch screen Left rocking bar, which is usually controlled by left hand, while the two sides of screen are additionally provided with for controlling virtual camera The left and right press key that camera lens is turned to.
But since left steering and control target movement are required to left hand and could complete, therefore left steering and control target Mobile and inconvenience carries out simultaneously, that is to say, that target, which is merely able to stop, could carry out steering operation in situ, this will make Overall feeling decline when players game play, and the hair of FPS and TPS in mobile touch screen equipment can be made because of inconvenient Exhibition is difficult, and the market effect having is not achieved.
Summary of the invention
In view of the deficiencies of the prior art, the purpose of the present invention, which is intended to provide, a kind of facilitates virtual camera to carry out sliding to turn To, while the sliding forward method of the shooting game of game experiencing degree can be effectively improved.
To achieve the above object, the present invention adopts the following technical scheme that:
A kind of sliding forward method of shooting game is applied to the mobile terminal with touch display screen comprising such as Lower step:
Positioning step, when mobile terminal is in interface, if detecting, the right side of touch screen has pressing operation, Record the position of current press touch screen;
Judgment step presses the operation that horizontally slips when described, then executes sliding and turn to step, when the pressing disappears It then executes click and turns to step;
Sliding turns to step, is calculated according to the position of this pressing touch screen and the position of last pressing touch screen Sliding distance and glide direction in X-axis, it is corresponding according to the sliding distance and glide direction driving virtual camera rotation Angle so that the virtual camera rotates to the left and to the right relative to the display screen of mobile terminal;
It clicks and turns to step, drive the center rotation of virtual camera to the position of current press touch screen.
Preferably, the sliding turns to step and further includes,
When the pressing disappears, then restoring to normal position step.
Preferably, it includes following sub-step that the click, which turns to step,:
First additional step obtains the click coordinate of touch screen, and creates one from the nearly sanction face of virtual camera is Put and pass through the ray of click coordinate;
Second additional step obtains the directioin parameter of the ray, according to the directioin parameter create Z axis towards with Direction parameter is identical to watch constraint rotation quaternary number attentively;
Applying step constrains rotation quaternary number degree of progress calculation according to main view, and by interpolation arithmetic, so that virtual camera It rotates to the position of current press touch screen.
The invention further relates to a kind of sliding steerings of shooting game, are applied to the mobile end with touch display screen End, including following module:
Locating module, for when mobile terminal is in interface, the right side of touch screen to have pressing to grasp if detecting Make, then records the position of current press touch screen;
Judgment module then executes sliding steering module, when the pressing for pressing the operation that horizontally slips when described Disappearance then executes click steering module;
Steering module is slided, for calculating according to the position of this pressing touch screen and the position of last pressing touch screen Sliding distance and glide direction in X-axis are obtained, according to the sliding distance and glide direction driving virtual camera rotation Corresponding angle, so that the virtual camera rotates to the left and to the right relative to the display screen of mobile terminal;
Steering module is clicked, for driving the center rotation of virtual camera to the position of current press touch screen.
Preferably, the sliding steering module further includes, when the pressing disappears, then restoring to normal position module.
Preferably, the click steering module includes following submodule:
First supplementary module for obtaining the click coordinate of touch screen, and creates a nearly sanction face from virtual camera For starting point and across the ray of click coordinate;
Second supplementary module creates a Z axis court according to the directioin parameter for obtaining the directioin parameter of the ray Constraint rotation quaternary number is watched attentively to identical with direction parameter;
Application module, for constraining rotation quaternary number degree of progress calculation according to main view, and by interpolation arithmetic, so that virtually taking the photograph The rotation numerical of camera is equal with orientation angle.
Beneficial effects of the present invention are as follows:
Facilitate virtual camera to carry out sliding steering, while game experiencing degree can be effectively improved.The present invention is slided using click Dynamic method controls the divertical motion of virtual camera, facilitates user and operates, and not slide when only clicking When, remaining unchanged in the thickness for unclamping touch screen may be implemented the steering click location of virtual camera, so that user grasps in game Use is more flexible during making, to improve the Experience Degree of game to a greater degree.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the better embodiment of the sliding forward method of shooting game of the present invention.
Fig. 2 is the stream for the better embodiment that click turns to step in a kind of sliding forward method of shooting game of the present invention Cheng Tu.
Specific embodiment
Below in conjunction with attached drawing and specific embodiment, the present invention is described further:
Referring to Figure 1, the present invention relates to a kind of sliding forward method of shooting game, it is applied to that there is touch display screen Mobile terminal, better embodiment includes the following steps:
Positioning step S1, when mobile terminal is in interface, if detecting, the right side of touch screen has pressing operation, Then record the position of current press touch screen.Wherein, the right side of touch screen is to click sliding response region.If there is clicking operation When, then call back function OnPointerDown is triggered, the position of current press touch screen is recorded and is denoted as variable pressPosition.Its specific code is as follows:
Judgment step S2 presses the operation that horizontally slips when described, then executes sliding and turn to step, when the pressing disappears Mistake then executes click and turns to step.
Sliding turns to step S3, is calculated according to the position of the position of this pressing touch screen and last pressing touch screen To the sliding distance and glide direction in X-axis, phase is rotated according to the sliding distance and glide direction driving virtual camera The angle answered, so that the virtual camera rotates to the left and to the right relative to the display screen of mobile terminal.Wherein in X-axis Sliding distance is the distance on the left and right directions of screen, and the glide direction in X-axis is leftward or rightward sliding.
Specifically, when it is described pressing horizontally slip operate when, triggering call back function OnBeginDrag, and by this Operation thing is defined as stroke and turns to visual angle, sets true for isDrag.Obtain the position for the screen that this is slided into and note For variable possition, and the rotation angle of current virtual camera is set as variables D ragBeginRotation, then count This sliding distance (on the basis of X-axis) is calculated, to obtain the rotation angle of the virtual camera after this sliding.I.e. originally The rotation angle of virtual camera after secondary sliding=(possition-pressPossition) * RotationRate+ DragBeginRotation.RotationRate variable is the Sensitirity va1ue that user rotates in backstage self-setting.Its specific generation Code logic is as follows:
Specifically, then triggering call back function OnDrag, and turn in step S3 when slide persistently carries out with sliding The same method of operation calculate the rotation angle of virtual camera again.Its specific code logic is as follows:
Meanwhile sliding and turning to step S3 and further include, when pressing disappearance, then restoring to normal position step.
It clicks and turns to step S4, drive the center rotation of virtual camera to the position of current press touch screen.Here The center of virtual camera is the quasi- heart shot and aimed at.
As shown in Fig. 2, it includes following sub-step that the click, which turns to step S4,:
First additional step S41 obtains the click coordinate of touch screen, and creates one and be from the nearly sanction face of virtual camera Starting point and the ray for passing through click coordinate;
Second additional step S42, obtains the directioin parameter of the ray, creates a Z axis court according to the directioin parameter Constraint rotation quaternary number is watched attentively to identical with direction parameter;
Applying step S43 constrains rotation quaternary number degree of progress calculation according to main view, and by interpolation arithmetic, so that virtually taking the photograph The rotation numerical of camera is equal towards angle with player role.
Specifically, call back function OnPointerUp and OnEndDrag can be triggered when unclamping point touching screen.When When isDrag=true, OnEndDrag terminates paddling operation thing.And as isDrag=false, OnPointerUp processing It clicks and turns to.Its code logic is specific as follows:
If unclamp point touching screen, call back function OnPointerUp is triggered, and as isDrag=false, OnPointerUp processing, which is clicked, to be turned to.The click coordinate touchPosition of touch screen is obtained at this time, and according to Unity function ScreenPointToRay to be created one by virtual camera and is starting point from the nearly sanction face of virtual camera and passes through click seat Mark the ray Ray of touchPosition.
Using the direction attribute direction of ray Ray as directioin parameter, a Z axis is created according to this directioin parameter Constraint rotation quaternary number Quaternion is watched attentively towards identical with direction parameter, it is assumed that defining this numerical designations is touchQ.Its specific code logic is as follows:
It constrains rotation quaternary number variable degree with main view to calculate, by interpolation arithmetic Quaternion.Lerp, so that virtual camera shooting The rotation numerical of machine is equal with orientation angle.Its specific code logic is as follows:
The invention further relates to a kind of sliding steerings of shooting game, are applied to the mobile end with touch display screen End, including following module:
Locating module, for when mobile terminal is in interface, the right side of touch screen to have pressing to grasp if detecting Make, then records the position of current press touch screen;
Judgment module then executes sliding steering module, when the pressing for pressing the operation that horizontally slips when described Disappearance then executes click steering module;
Steering module is slided, for calculating according to the position of this pressing touch screen and the position of last pressing touch screen Sliding distance and glide direction in X-axis are obtained, according to the sliding distance and glide direction driving virtual camera rotation Corresponding angle, so that the virtual camera rotates to the left and to the right relative to the display screen of mobile terminal;
Steering module is clicked, for driving the center rotation of virtual camera to the position of current press touch screen.
Preferably, the sliding steering module further includes, when the pressing disappears, then restoring to normal position module.
Preferably, the click steering module includes following submodule:
First supplementary module for obtaining the click coordinate of touch screen, and creates a nearly sanction face from virtual camera For starting point and across the ray of click coordinate;
Second supplementary module creates a Z axis court according to the directioin parameter for obtaining the directioin parameter of the ray Constraint rotation quaternary number is watched attentively to identical with direction parameter;
Application module, for constraining rotation quaternary number degree of progress calculation according to main view, and by interpolation arithmetic, so that virtually taking the photograph The rotation numerical of camera is equal with orientation angle
For those skilled in the art, it can make other each according to the above description of the technical scheme and ideas Kind is corresponding to be changed and deforms, and all these change and deform the protection model that all should belong to the claims in the present invention Within enclosing.

Claims (6)

1. a kind of sliding forward method of shooting game is applied to the mobile terminal with touch screen, which is characterized in that including Following steps:
Positioning step, when mobile terminal is in interface, if detecting, the right side of touch screen has pressing operation, records The position of current press touch screen;
Judgment step presses the operation that horizontally slips when described, then executes sliding and turn to step, when pressing disappearance is then held Row, which is clicked, turns to step;
Sliding turns to step, is calculated according to the position of the position of this pressing touch screen and last pressing touch screen in X Sliding distance and glide direction on axis rotate corresponding angle according to the sliding distance and glide direction driving virtual camera Degree, so that the virtual camera rotates to the left and to the right relative to the display screen of mobile terminal;
It clicks and turns to step, drive the center rotation of virtual camera to the position of current press touch screen.
2. the sliding forward method of shooting game as described in claim 1, which is characterized in that the sliding turns to step and also wraps It includes,
When the pressing disappears, then restoring to normal position step.
3. the sliding forward method of shooting game as described in claim 1, which is characterized in that the click turns to step and includes Following sub-step:
First additional step, obtains the click coordinate of touch screen, and create one from the nearly sanction face of virtual camera be starting point simultaneously Across the ray of click coordinate;
Second additional step obtains the directioin parameter of the ray, creates a Z axis direction and the party according to the directioin parameter Constraint rotation quaternary number is watched attentively to parameter is identical;
Applying step constrains rotation quaternary number degree of progress calculation according to main view, and by interpolation arithmetic, so that virtual camera rotates To the position of current press touch screen.
4. a kind of sliding steering of shooting game is applied to the mobile terminal with touch display screen, which is characterized in that Including following module:
Locating module is used for when mobile terminal is in interface, if detecting, the right side of touch screen has pressing operation, Record the position of current press touch screen;
Judgment module then executes sliding steering module, when the pressing disappears for pressing the operation that horizontally slips when described Then execute click steering module;
Steering module is slided, for being calculated according to the position of this pressing touch screen and the position of last pressing touch screen Sliding distance and glide direction in X-axis, it is corresponding according to the sliding distance and glide direction driving virtual camera rotation Angle so that the virtual camera rotates to the left and to the right relative to the display screen of mobile terminal;
Steering module is clicked, for driving the center rotation of virtual camera to the position of current press touch screen.
5. the sliding steering of shooting game as claimed in claim 4, which is characterized in that the sliding steering module also wraps It includes,
When the pressing disappears, then restoring to normal position module.
6. the sliding steering of shooting game as claimed in claim 4, which is characterized in that the click steering module includes Following submodule:
First supplementary module for obtaining the click coordinate of touch screen, and creates one from the nearly sanction face of virtual camera is Put and pass through the ray of click coordinate;
Second supplementary module, for obtaining the directioin parameter of the ray, according to the directioin parameter create Z axis towards with Direction parameter is identical to watch constraint rotation quaternary number attentively;
Application module, for constraining rotation quaternary number degree of progress calculation according to main view, and by interpolation arithmetic, so that virtual camera Rotation numerical it is equal with orientation angle.
CN201510471135.0A 2015-07-31 2015-07-31 A kind of the sliding forward method and device of shooting game Active CN105068706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510471135.0A CN105068706B (en) 2015-07-31 2015-07-31 A kind of the sliding forward method and device of shooting game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510471135.0A CN105068706B (en) 2015-07-31 2015-07-31 A kind of the sliding forward method and device of shooting game

Publications (2)

Publication Number Publication Date
CN105068706A CN105068706A (en) 2015-11-18
CN105068706B true CN105068706B (en) 2018-11-20

Family

ID=54498091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510471135.0A Active CN105068706B (en) 2015-07-31 2015-07-31 A kind of the sliding forward method and device of shooting game

Country Status (1)

Country Link
CN (1) CN105068706B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105498202A (en) * 2015-11-26 2016-04-20 珠海网易达电子科技发展有限公司 Full-touch screen-swiping shooting operation mode
CN105373336B (en) * 2015-12-17 2018-06-12 网易(杭州)网络有限公司 Control method and device are presented in information panel
JP6389208B2 (en) * 2016-06-07 2018-09-12 株式会社カプコン GAME PROGRAM AND GAME DEVICE
CN107469353A (en) * 2017-08-02 2017-12-15 网易(杭州)网络有限公司 Method of adjustment, device and the terminal device of game camera lens
CN108749732B (en) * 2018-05-25 2021-06-08 昆山品源知识产权运营科技有限公司 Angle adjusting method and device for central control display screen, storage medium and central control display screen
CN109529320B (en) * 2018-12-29 2022-04-12 网易(杭州)网络有限公司 Steering control method and device in game
CN111467803B (en) * 2020-04-02 2023-07-14 网易(杭州)网络有限公司 Display control method and device in game, storage medium and electronic equipment
CN113332704B (en) * 2021-06-28 2023-05-16 北京字跳网络技术有限公司 Control method, device and computer storage medium
CN114489457B (en) * 2022-01-27 2024-01-19 北京字跳网络技术有限公司 Virtual object control method and device, readable medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103210367A (en) * 2012-09-29 2013-07-17 华为终端有限公司 Electronic apparatus and method for controlling display object scaling
CN103713848A (en) * 2013-12-26 2014-04-09 上海鼎为通讯电子有限公司 Mobile terminal and operation method thereof
CN104548596A (en) * 2015-02-02 2015-04-29 陈荣 Aiming method and device of shooting games

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040199052A1 (en) * 2003-04-01 2004-10-07 Scimed Life Systems, Inc. Endoscopic imaging system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103210367A (en) * 2012-09-29 2013-07-17 华为终端有限公司 Electronic apparatus and method for controlling display object scaling
CN103713848A (en) * 2013-12-26 2014-04-09 上海鼎为通讯电子有限公司 Mobile terminal and operation method thereof
CN104548596A (en) * 2015-02-02 2015-04-29 陈荣 Aiming method and device of shooting games

Also Published As

Publication number Publication date
CN105068706A (en) 2015-11-18

Similar Documents

Publication Publication Date Title
CN105068706B (en) A kind of the sliding forward method and device of shooting game
US11010611B2 (en) VR content shooting method, related device and system
CN107533373B (en) Input via context-sensitive collision of hands with objects in virtual reality
Deng et al. How to learn an unknown environment
CN104548596B (en) Aiming method and device of shooting games
CN108646997A (en) A method of virtual and augmented reality equipment is interacted with other wireless devices
WO2019019968A1 (en) Displacement control method and device for virtual character, and storage medium
CN106791437B (en) Panoramic image shooting method and mobile terminal
JP2022526134A (en) Virtual object control method, device, terminal and storage medium
JP6078719B2 (en) Movement control apparatus and program
CN104656877A (en) Human-machine interaction method based on gesture and speech recognition control as well as apparatus and application of human-machine interaction method
CN105607851A (en) Scene control method and device for touch terminal
CN111773657B (en) Method and device for switching visual angles in game, electronic equipment and storage medium
CN108307044B (en) A kind of terminal operation method and equipment
CN108543308B (en) Method and device for selecting virtual object in virtual scene
CN113941142A (en) Control method and device of virtual model, storage medium and electronic equipment
JP6217004B2 (en) Movement control apparatus and program
CN115888094A (en) Game control method, device, terminal equipment and storage medium
CN113332704B (en) Control method, device and computer storage medium
Jacob et al. Desktop orbital camera motions using rotational head movements
TW201913298A (en) Virtual reality system capable of showing real-time image of physical input device and controlling method thereof
JP5907184B2 (en) Information processing apparatus, information processing method, and program
CN113680062A (en) Information viewing method and device in game
CN103793053B (en) Gesture projection method and device for mobile terminals
CN111766947A (en) Display method, display device, wearable device and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20170411

Address after: 510651 Guangzhou, Guangdong, Tangxia, the second floor of the two society of the public, room 69, No. 603, room

Applicant after: Wanjie (Shanghai) Network Co.,Ltd.

Address before: 510650 Tianhe District, Guangzhou, Tangxia West Road, No. 601 Tian Hui building, room, room 69

Applicant before: Zhang Weiqian

Applicant before: Hu Yahui

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A sliding turning method and device for shooting game

Effective date of registration: 20200907

Granted publication date: 20181120

Pledgee: China Co. truction Bank Corp Guangzhou Tianhe subbranch

Pledgor: Wanjie (Shanghai) Network Co.,Ltd.

Registration number: Y2020440000250

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20210806

Granted publication date: 20181120

Pledgee: China Co. truction Bank Corp Guangzhou Tianhe subbranch

Pledgor: Wanjie (Shanghai) Network Co.,Ltd.

Registration number: Y2020440000250

PC01 Cancellation of the registration of the contract for pledge of patent right
TR01 Transfer of patent right

Effective date of registration: 20231107

Address after: Room 119-2, Building 9, Oulu Classic Community, Zhenxing Road, Khorgos, Yili Kazak Autonomous Prefecture, Xinjiang Uygur Autonomous Region, 835221

Patentee after: Horgos Kaleidoscope Network Technology Co.,Ltd.

Address before: Room 603, No. 69, Yongbian Road, Tangxia Ershe, Tianhe District, Guangzhou City, Guangdong Province, 510651

Patentee before: Wanjie (Shanghai) Network Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240905

Address after: Room 802-2, No. 116 Fengle North Road, Huangpu District, Guangzhou City, Guangdong Province 510000

Patentee after: Mobile Games Entertainment Technology (Guangzhou) Co.,Ltd.

Country or region after: China

Address before: Room 119-2, Building 9, Oulu Classic Community, Zhenxing Road, Khorgos, Yili Kazak Autonomous Prefecture, Xinjiang Uygur Autonomous Region, 835221

Patentee before: Horgos Kaleidoscope Network Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right