CN107050861A - Method, device, storage medium and the processor of camera lens lock onto target - Google Patents
Method, device, storage medium and the processor of camera lens lock onto target Download PDFInfo
- Publication number
- CN107050861A CN107050861A CN201710271135.5A CN201710271135A CN107050861A CN 107050861 A CN107050861 A CN 107050861A CN 201710271135 A CN201710271135 A CN 201710271135A CN 107050861 A CN107050861 A CN 107050861A
- Authority
- CN
- China
- Prior art keywords
- camera lens
- angle
- angular range
- default
- line vector
- 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.)
- Granted
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Lens Barrels (AREA)
- Studio Devices (AREA)
Abstract
The invention discloses a kind of method, device, storage medium and the processor of camera lens lock onto target.Wherein, this method includes:Trigger event is monitored, wherein, trigger event locks the event of Mission Objective for triggering camera lens;In the case where listening to trigger event, adjust the direction of camera lens, wherein, the angle between the direction of the rear lens of adjustment and line vector is in default angular range, the vector of the game role position that line vector is controlled by game player to Mission Objective position.The present invention solves game, and lock onto target operates complex technical problem in the prior art.
Description
Technical field
The present invention relates to data processing field, in particular to a kind of method of camera lens lock onto target, device, storage
Medium and processor.
Background technology
With the fast development of smart mobile phone, increasing game products climb up cell phone platform, and handset capability is carried
It is high so that the content of hand trip is gradually evolved into the MMO (Massively of severe from conventional recreational games
Multiplayer Online, abbreviation MMO) type.Although game content increasingly severe, for fear of cell-phone customer terminal screen
The less feature of size, the operation in game must be simple, can just there is more preferable experience.Non- 2D hands trip on the market, according to
The property of video camera, can be divided into two kinds of 2.5D and 3D, wherein, 2.5D represents the camera lens of fixed camera, and player cannot be random
Rotary viewing angle, 3D then represents that player can rotate freely the camera lens of camera.Play star roles model and other NPC model dialogs, or
During fight, it may appear that following problem:If the NPC models of dialogue do not exist in leading role and the front of camera lens, or not
In the viewing area of camera lens, then interactive experience can be poor;During fight, if subjected to attack, but monster is not in camera lens
Front, then can not see monster, it is impossible to attack or dodge at once.If camera lens can rotate, rotation manually is now needed first
Transposable lenses, the operation that could be attacked is operated more complicated.
For it is above-mentioned the problem of, effective solution is not yet proposed at present.
The content of the invention
The embodiments of the invention provide a kind of method, device, storage medium and the processor of camera lens lock onto target, with least
Solving game, lock onto target operates complex technical problem in the prior art.
One side according to embodiments of the present invention there is provided a kind of method of camera lens lock onto target, including:Monitor triggering
Event, wherein, the trigger event locks the event of Mission Objective for triggering camera lens;Listening to the situation of the trigger event
Under, the direction of the camera lens is adjusted, wherein, the angle after adjustment between the direction of the camera lens and line vector is in default
In angular range, the game role position that the line vector is controlled by game player is in place to Mission Objective institute
The vector put.
Further, in the case where listening to the trigger event, adjusting the direction of the camera lens includes:Judge described
Whether line vector is in default angular range;If it is judged that the line vector is not in the default angular range
It is interior, then the camera lens is subjected to rotation according to predetermined direction and be in up to the line is vectorial in the default angular range, its
In, the angle of the direction of the camera lens is in described pre- after line vector and adjustment in the default angular range
If in angular range, and camera lens is so that the default angular range is rotated in the direction of minimum angles.
Further, the camera lens is so that the default angular range is rotated in the direction of minimum angles.
Further, the camera lens is subjected to rotation according to predetermined direction until line vector is in the default folder
Include in angular region:The camera lens is subjected to rotation until line vector is in the default folder according to the predetermined direction
The centre position of angular region.
Further, in the case where listening to the trigger event, adjusting the direction of the camera lens includes:Obtain described
The current angle towards between line vector of camera lens;Judge whether the angle is equal to default angle, wherein, it is described
Default angle is the angle in the default angular range;If it is judged that the angle is not equal to the default angle,
Then the direction of the camera lens is rotated according to predetermined direction until after adjustment between the direction of the camera lens and line vector
Angle be equal to the default angle, wherein, camera lens is so that the default angular range is rotated in the directions of minimum angles.
Further, adjusting the direction of the camera lens includes:The camera lens is controlled to start rotation with predetermined initial velocity,
And be incremented by with the predetermined acceleration every predetermined frame number, the direction of the camera lens and line vector after adjustment
Between angle be in default angular range.
Further, the monitoring trigger event includes:Monitor the Mission Objective and operation is performed to the game role
Event;And/or monitor the event that the game role performs operation to the Mission Objective.
Another aspect according to embodiments of the present invention, additionally provides a kind of device of camera lens lock onto target, including:Monitor mould
Block, for monitoring trigger event, wherein, the trigger event locks the event of Mission Objective for triggering camera lens;Adjusting module, is used
In in the case where listening to the trigger event, the direction of the camera lens is adjusted, wherein, the direction of the camera lens after adjustment
Angle between line vector is in default angular range, the game role that the line vector is controlled by game player
Vector of the position to the Mission Objective position.
Further, the adjusting module is used for:Judge the line vector whether in default angular range;If
Judge that the line vector is not in the default angular range, then carry out the camera lens according to predetermined direction rotating directly
To line vector in the default angular range, wherein, the line vector in the default angular range
It is in the angle of the direction of the camera lens after adjustment in the default angular range, and camera lens is so that the default angle model
Enclose and rotated in the direction of minimum angles.
Further, the adjusting module is used for:The camera lens is subjected to rotation until described according to the predetermined direction
Line vector is in the centre position of the default angular range.
Further, the adjusting module is used for:Obtain the current towards between line vector of the camera lens
Angle;Judge whether the angle is equal to default angle, wherein, the default angle is in the default angular range
Angle;If it is judged that the angle is not equal to the default angle, then the direction according to the predetermined direction rotation camera lens is straight
To adjust after the camera lens direction and the line vector between angle be equal to the default angle, wherein, camera lens with
The default angular range is set to be rotated in the direction of minimum angles.
Further, the adjusting module is used for:The camera lens is controlled to start rotation with predetermined initial velocity, and with institute
State predetermined acceleration every predetermined frame number to be incremented by, the folder after the adjustment between the direction of the camera lens and line vector
Angle is in default angular range.
Further, the monitoring module includes:Monitor the thing that the Mission Objective performs operation to the game role
Part;And/or monitor the event that the game role performs operation to the Mission Objective.
Other side according to embodiments of the present invention, has been also provided on a kind of storage medium, the storage medium and has protected
Computer program stored, performs upper described method when described program is run.
Other side according to embodiments of the present invention, has been also provided to a kind of processor, has been held when described program is run
The above-mentioned method of row.
In embodiments of the present invention, using monitoring trigger event, wherein, the trigger event is triggering camera lens locking game
The event of target;In the case where listening to the trigger event, the direction of the camera lens is adjusted, wherein, it is described after adjustment
Angle between the direction of camera lens and line vector is in default angular range, and the line vector is in place for game role institute
The vectorial mode of the Mission Objective position is put, in the case where listening to triggering camera lens locking Mission Objective, is adjusted
The direction of whole camera lens so that the angle between camera lens direction and the vector of game player to the Mission Objective after adjustment
In in default angular range, now, camera lens can unobstructedly lock onto target, relative to locking target of attack phase in the prior art
To complex scheme, using the method for camera lens lock onto target provided in an embodiment of the present invention, accurate and fast lock has been reached
Determine the purpose of Mission Objective, it is achieved thereby that simplify the technique effect of the operating procedure of lock onto target, and then it is existing to solve game
There is lock onto target in technology to operate complex technical problem.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this hair
Bright schematic description and description is used to explain the present invention, does not constitute inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of the method for camera lens lock onto target according to embodiments of the present invention;
Fig. 2 is the position view between a kind of game role according to embodiments of the present invention and Mission Objective;
Fig. 3 is a kind of structural representation of camera lens lock onto target according to embodiments of the present invention;
Fig. 4 is the structural representation of another camera lens lock onto target according to embodiments of the present invention;And
Fig. 5 is a kind of schematic diagram of the device of camera lens lock onto target according to embodiments of the present invention.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people
The every other embodiment that member is obtained under the premise of creative work is not made, should all belong to the model that the present invention is protected
Enclose.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, "
Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so using
Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except illustrating herein or
Order beyond those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover
Lid is non-exclusive to be included, for example, the process, method, system, product or the equipment that contain series of steps or unit are not necessarily limited to
Those steps or unit clearly listed, but may include not list clearly or for these processes, method, product
Or the intrinsic other steps of equipment or unit.
According to embodiments of the present invention there is provided a kind of embodiment of the method for camera lens lock onto target, it is necessary to explanation,
The step of flow of accompanying drawing is illustrated can perform in the computer system of such as one group computer executable instructions, also,
, in some cases, can be shown to be performed different from order herein although showing logical order in flow charts
The step of going out or describe.
Fig. 1 is a kind of flow chart of the method for camera lens lock onto target according to embodiments of the present invention, as shown in figure 1, the party
Method comprises the following steps:
Step S102, monitors trigger event, wherein, trigger event locks the event of Mission Objective for triggering camera lens;
In the embodiment of the present invention, camera lens is used to follow game role in game, and game role is presented in display interface,
For example, being presented in the display interface of mobile phone or computer.In gaming, the game that Mission Objective can be controlled by game player
The target that role is attacked, or attack the target of game role.It should be noted that in embodiments of the present invention, mesh of playing
Mark is not limited to the target of game role attack or attack game role, can also be operated for game role performance objective
Target, for example, to Mission Objective give stage property or release technical ability, and Mission Objective to game role give stage property or release skill
Energy.
Therefore, in embodiments of the present invention, when listen to Mission Objective to game role perform operation event or prison
When hearing that game role performs the event of operation to Mission Objective, that is, trigger camera lens locking Mission Objective.If do not listened to
During above-mentioned event, then the operation of locking Mission Objective is not performed.
Step S104, in the case where listening to trigger event, adjusts the direction of camera lens, wherein, the rear lens of adjustment
It is in towards the angle value between line vector in default angular range, line vector is game role position to game
The vector of target position.
In embodiments of the present invention, for example, during game is carried out, once listening to game role attacks a certain monster
Thing, or during a certain monster attack game role, that is, the event that camera lens locks Mission Objective is triggered, at this point it is possible to accordingly
Adjust the direction of camera lens so that camera lens can unobstructedly capture the monster (that is, Mission Objective).
It is the direction for adjusting camera lens so that the direction of camera lens and line vector during being adjusted to camera lens
Between angle be in default angular range, wherein, when the angle between direction and the line vector of camera lens is in default angle
In the range of when, camera lens is in optimum position, and camera lens now can capture Mission Objective exactly.
It should be noted that in embodiments of the present invention, line vector refers to:The game role controlled with game player
Position is starting point, the vectorial line by terminal of Mission Objective position.
In embodiments of the present invention, when between game role position and Mission Objective position line vector with
When the direction of camera lens is in default angular range, optimal visibility angle is reached between game role and Mission Objective and camera lens, i.e.,:
The distance of Mission Objective and camera lens is more remote than the distance of game role and camera lens, that is to say, that now game role is
Back to camera lens.Specifically, as shown in Figure 2 a, the distance of Mission Objective and camera lens is nearer than the distance of game role and camera lens, because
This is unsatisfactory for condition;In figure 2b, the position of Mission Objective and camera lens is more remote than the position of game role and camera lens, therefore meets
State condition.
It should be noted that as shown in Figure 2 a, game role faces camera lens, monster (Mission Objective played) is located at
Behind game role, such a situation should be when also not having lock onto target.Once having locked target, game role should
It is towards monster.Required optimum angle scope should be game role and Mission Objective in camera lens in the embodiment of the present invention
The same side, i.e., in front of camera lens, and game role will be from camera lens closer to so with the visual angle of player, game role is front
In face of target, so as to obtain preferably observation experience in gaming.
In embodiments of the present invention, in the case where listening to triggering camera lens locking Mission Objective, the direction of camera lens is adjusted,
So that folder of the camera lens towards the line game role position to Mission Objective position between vectorial after adjustment
Angle is in default angular range, now, camera lens can unobstructedly lock onto target, relative to locking attack mesh in the prior art
The relatively complicated scheme of mark, using the method for camera lens lock onto target provided in an embodiment of the present invention, has reached accurate and fast
The purpose of speed locking Mission Objective, it is achieved thereby that simplifying the technique effect of the operating procedure of lock onto target, and then solves trip
Lock onto target operates complex technical problem in the prior art for play.
In an optional embodiment, in the case where listening to trigger event, the direction of adjustment camera lens includes:Obtain
The current angle towards between line vector of camera switching;Judge its angle value whether in default angular range;If sentenced
Break and angle value not in default angular range, then the direction of rotating lens is until the direction and line vector of the rear lens of adjustment
Between angle be in default angular range, wherein, the angle that camera lens rotates according to predetermined direction is minimum.
Line vector is illustrated with reference to such as accompanying drawing to the embodiment of the present invention.
Fig. 3 is a kind of schematic diagram of camera lens lock onto target according to embodiments of the present invention.
The center of circle 4 shown in Fig. 3 represents the position of camera lens 5, and round radius is between camera lens and game role position
Distance, be a fixed value." ↑ " represents in the direction such as Fig. 3 of camera lens, in addition, by Mission Objective and game role position
The starting point of the line vector of connection moves to the center of circle 4, and primary vector 1, the vector 3 of secondary vector 2 and the 3rd represent Mission Objective respectively
Between game role position three kinds of lines vector situation in embodiments of the present invention, shadow region as shown in Figure 3
Domain is to be expressed as default angular range 6, also referred to as presets angular range 6.For example,
The current direction of camera lens is obtained, and judges whether line vector 7 is located at the default angular range represented by shadow region
It is interior, as illustrated, S vectors are line vector, judge whether the angle between camera lens and S vectors meets predetermined angle scope,
Whether the embodiment in figure is line vector in default angular range.As can be known from Figure, line vector S is not in default folder
In angular region, it is therefore desirable to the direction of rotating lens so that the angle between the direction and line vector S of adjustment rear lens is met
Default angular range, i.e. line vector S are in buffering area.
3rd vector in Fig. 3, where the line vector of game role and Mission Objective is the primary vector of diagram
During position, the angle of primary vector and camera lens between is calculated, judges that camera lens should right direction rotation, that is to say, that mirror
Head turns clockwise, and increases primary vector and the angle of camera lens direction, until rotating to primary vector and camera lens between
Angle value meet with preset angular range, to avoid game role from blocking Mission Objective.When game role and Mission Objective
When line is in the position shown in vector 2, judge that camera lens should be to anticlockwise, that is to say, that camera lens will carry out rotate counterclockwise,
Make vector 2 and the angle increase of camera lens direction, until angle value of the rotation to secondary vector and camera lens between is in and preset
In angular range.When the line of game role and Mission Objective is in the position shown in the 3rd vector, in default angle model
In enclosing, then camera lens need not be adjusted.In embodiments of the present invention, default angular range is set according to experience actual in gaming
Fixed empirical value, is an angular range, such as 30 °~60 °.I.e. on stream, by debugging camera lens, camera lens phase is found
The angular range of pass, rotates in this angular range in the direction of camera lens and can be very good that avatar model and target is presented
Actor model, allows users to preferably operation game.After angle value surpasses and gone beyond the scope, now object module may be just
The screen edge that camera lens is presented, or the region beyond camera lens visual range are appeared in, Consumer's Experience is poor.
When line vector is in Fig. 3 the position shown in primary vector, secondary vector and the 3rd vector, game role and
All in the same side of camera lens 4 still, in actual game process, game role and game often occurs in Mission Objective
Target occurs all in the situation of the both sides of camera lens, and the 3rd vector that there is also game role to Mission Objective is in X in Fig. 3
Situation below axle.But in this case, the setting of default angular range is still to be based on presetting angular range for 0~90 °,
That is Mission Objective position is more farther from camera lens than game leading role's model position.
The schematic diagram for another camera lens lock onto target shown in Fig. 4.As shown in figure 4, between line vector and camera lens
Angle is more than 90 degree, that is to say, that the both sides of game role and Mission Objective all in camera lens.In the case, how to rotate
Camera lens direction, it is minimum depending on the angle adjusted to which direction.Figure 4, it is seen that camera lens rotate counterclockwise is reached
During optimum angle position, the angle of rotation is minimum.
When there is situation as shown in Figure 4, line vector can be moved to the position in the center of circle, then, line is judged
Whether the angle of vector and camera lens between is in default angular range.When the angle of line vector and camera lens between
When being not in default angular range, then the direction of corresponding adjustment camera lens is needed, until line vector sum camera lens is between
Angle be in default angular range, or angle of the line vector sum camera lens between is optimum angle value.
Preferably, the real needs played according to different type, can preset some folder in default angular range
Angle value, then judges whether camera lens is equal with the angle value chosen towards the angle between line vector;If the two is equal,
Camera lens need not be adjusted;If the two, camera lens is subjected to rotation adjustment until the two angle value is equal.For example, pre-
If angular range is 30 °~60 °, optimum angle value can be median, i.e., 45 °.Because when camera lens start rotation, by camera lens from
Rotated to outside default angular range in default angular range, if rotating to default angular range edge, then once trip
Programme mark produces small displacement, and camera lens may rotate out of default angular range again, rotation tune will be now carried out again
It is whole.And rotate to the centre of default angular range, i.e., in optimum angle value, then the left and right sides of camera lens has buffering range,
It is that user brings more preferable experience so as to reduce the frequency of rotation of lens.
It should be noted that in embodiments of the present invention, if camera lens is carried out into rotation until camera lens according to the method described above
When angle between line vector is optimum angle value, it is possible that due to mirror caused by the drastically change of line vector
There is situation about shaking in head.Therefore, in embodiments of the present invention, correspondingly it is provided with pre- in two default angular ranges, i.e. Fig. 3
If the region shown in angular range dash area.
Now, in the case where listening to trigger event, the direction of adjustment camera lens can be:Judge whether line vector is located
In in default angular range;If it is judged that line vector is not in default angular range, then by camera lens according to predetermined direction
Rotate and be in up to line is vectorial in default angular range, wherein, the line in default angular range is vectorial and adjusts
The angles of direction of rear lens be in default angular range, and camera lens is so that default angular range is in the direction of minimum angles
Rotated.
In the case of trigger event is listened to, line vector is may determine that first whether in default angular range,
If it is judged that line vector is in default angular range, then may not necessarily rotating lens, or camera lens is finely adjusted,
Adjust to centre position of the line vector in default angular range.If it is judged that line vector is not in default angular range
When, then can rotating lens in the predetermined direction, until line vector is in default angular range.Predetermined direction includes suitable
Clockwise and counter clockwise direction, specifically rotate depending on minimum according to which direction anglec of rotation according to which direction.
Alternatively, in order to avoid causing the trickle shake of camera lens because of game role action displacement, during each camera lens adjustment,
Camera lens according to predetermined direction rotate until centre position of the line vector in default angular range.For example, such as
Two sides of the default angular range shown in Fig. 3 and the angle of X-axis be between 30 degree to 70 degree, at this point it is possible to by line vector
It is adjusted to 50 degree or so of position, can so avoid the shake of camera lens.
In the optional embodiment of the present invention, camera lens is moved to target location with predetermined acceleration and specifically may be used
Think:Control camera lens starts rotation with predetermined initial velocity, and is incremented by with predetermined acceleration every predetermined frame number, until
Angle between the direction of the rear lens of adjustment and line vector is in default angular range.
When the character (that is, model) in game is subjected to displacement in scene of game, the mobile row of camera lens can be triggered
For that is, the camera lens in triggering game starts movement with initial velocity, and is incremented by with predetermined acceleration every several frames, until operation
To target location.For example, the initial velocity for the camera lens that research staff is set is a, then when judging that model is subjected to displacement, the mirror
The initial velocity a that head is just set with research staff is moved, during movement, every n frames, and initial velocity increases b (that is, on
State predetermined acceleration), until camera lens is moved to target location.
The embodiment of the present invention additionally provides a kind of device of camera lens lock onto target, and the device of the camera lens lock onto target is mainly used
In the method for performing the camera lens lock onto target that the above of the embodiment of the present invention is provided, offer is sent to the embodiment of the present invention below
The device of camera lens lock onto target do specific introduction.
Fig. 5 is a kind of schematic diagram of lens moving apparatus according to embodiments of the present invention, as shown in figure 5, including:Monitor mould
Block 51 and adjusting module 53, wherein:
Module is monitored, for monitoring trigger event, wherein, trigger event locks the event of Mission Objective for triggering camera lens;
In the embodiment of the present invention, camera lens is used to follow game role in game, and game role then is presented in into display circle
In face, for example, being presented in the display interface of mobile phone, or it is presented in the display interface of computer.Mission Objective can be trip
The target that the game role that play player is controlled is attacked, or attack the target of game role.It should be noted that in this hair
In bright embodiment, Mission Objective is not limited to the target of game role attack or attack game role, can also be game
The target of role's performance objective operation, for example, give technical ability or Mission Objective to Mission Objective gives technical ability to game role.
Therefore, in embodiments of the present invention, when listen to game to game role perform operation event or listen to
When game role performs the event of operation to Mission Objective, you can to trigger camera lens locking Mission Objective.If do not listened to
During above-mentioned event, it is not carried out locking the operation of Mission Objective.
Adjusting module, in the case where listening to trigger event, adjusting the direction of camera lens, wherein, mirror after adjustment
Angle between the direction of head and line vector is in default angular range, and line vector arrives Mission Objective for game player
Vector.
In embodiments of the present invention, if listening to game role attacks a certain monster, or the attack game of a certain monster
During role, that is, the event that camera lens locks Mission Objective is triggered, at this point it is possible to accordingly adjust the direction of camera lens so that camera lens
The monster (that is, Mission Objective) can unobstructedly be captured.
It is the direction for adjusting camera lens so that the direction of camera lens and line vector during being adjusted to camera lens
Between angle be in default angular range, wherein, when the angle between direction and the line vector of camera lens is in default angle
In the range of when, camera lens is in optimum position, and camera lens now can capture Mission Objective exactly, wherein, preset angle model
Enclose and be properly termed as optimum angle scope.
It should be noted that in embodiments of the present invention, above-mentioned line vector refers to the game angle that game player is controlled
Color position is to the vector between Mission Objective position, and the game role that is oriented to of line vector is pointed to
State the sensing of Mission Objective.
In embodiments of the present invention, when the direction of the vector between game role and Mission Objective and camera lens is in optimal folder
During angular region, game role and Mission Objective meet following condition with camera lens:
The position of Mission Objective and camera lens is more remote than the position of game role and camera lens, that is to say, that game role be back to
Camera lens.Specifically, as shown in Fig. 2 in Fig. 2 left figure, the position of Mission Objective and camera lens is than game role and camera lens
Position is near, therefore is unsatisfactory for condition;In Fig. 2 left figure, position of the position than game role and camera lens of Mission Objective and camera lens
Put remote, therefore meet above-mentioned condition.
It should be noted that as shown in left in Figure 2, game role faces camera lens, monster behind game role,
Such a situation should be when also not having lock onto target.If necessarily having locked target, game role should be towards monster
's.In the embodiment of the present invention required optimum angle scope should be game role and Mission Objective in the same side of camera lens,
I.e. in front of camera lens, and game role will be from camera lens closer to such player positive can face target, preferably observation.
In embodiments of the present invention, in the case where listening to the time of triggering camera lens locking Mission Objective, camera lens is adjusted
Direction so that camera lens after adjustment towards and game role position to Mission Objective position it is vectorial between
Angle is in default angular range, now, camera lens can unobstructedly lock onto target, relative to locking attack in the prior art
The relatively complicated scheme of target, using the method for camera lens lock onto target provided in an embodiment of the present invention, has reached accurately simultaneously
The purpose of quick lock in Mission Objective, it is achieved thereby that simplifying the technique effect of the operating procedure of lock onto target, and then is solved
Lock onto target operates complex technical problem in the prior art for game.
Alternatively, adjusting module is used for:Judge line vector whether in default angular range;If it is judged that line
Vector is not in default angular range, then camera lens is carried out into rotation according to predetermined direction until line vector is in default angle
In the range of, wherein, the angle of line vector and the direction of the rear lens of adjustment in default angular range is in default angle
In the range of, and the angle that camera lens rotates according to predetermined direction is minimum.
Alternatively, adjusting module is used for:By camera lens so that default angular range is rotated in the direction of minimum angles.
Alternatively, adjusting module is used for:Camera lens is subjected to rotation until line vector is in default folder according to predetermined direction
The centre position of angular region.
Alternatively, adjusting module is used for:Obtain the current angle towards between line vector of camera lens;Judge angle
Whether size is equal to default angle value, wherein, it in default angle value is the folder in default angular range that default angle, which is,
The value at angle;If it is judged that angle is not equal to default angle value, then according to the direction of predetermined direction rotating lens up to adjustment
Angle between the direction of rear lens and line vector is equal to default angle, wherein, camera lens is so that default angular range is in minimum
The direction of angle is rotated.
Alternatively, adjusting module is used for:Control camera lens starts rotation with predetermined initial velocity, and with predetermined acceleration
It is incremented by every predetermined frame number, until the angle between the direction and line vector of the rear lens of adjustment is in default angular range
It is interior.
Alternatively, monitoring module includes:Monitor the event that Mission Objective performs operation to game role;And/or monitor trip
The role that plays performs the event of operation to Mission Objective.
A kind of device embodiment of above-mentioned camera lens lock onto target is, institute corresponding with a kind of method of camera lens lock onto target
To be repeated no more for beneficial effect.
The embodiments of the invention provide a kind of storage medium, storage medium includes the program of storage, wherein, in program operation
When control storage medium where equipment perform the above method.
The embodiments of the invention provide a kind of processor, processor includes the program of processing, wherein, run time control in program
Equipment performs the above method where processor processed.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in some embodiment
The part of detailed description, may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents, others can be passed through
Mode is realized.Wherein, device embodiment described above is only illustrative, such as the division of described unit, can be one
Kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can combine or
Another system is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed it is mutual it
Between coupling or direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of unit or module by some interfaces
Connect, can be electrical or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On unit.Some or all of unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized using in the form of SFU software functional unit and as independent production marketing or used
When, it can be stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially
The part contributed in other words to prior art or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer
Equipment (can for personal computer, server or network equipment etc.) perform each embodiment methods described of the invention whole or
Part steps.And foregoing storage medium includes:USB flash disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with store program codes
Medium.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.
Claims (15)
1. a kind of method of camera lens lock onto target, it is characterised in that including:
Trigger event is monitored, wherein, the trigger event locks the event of Mission Objective for triggering camera lens;
In the case where listening to the trigger event, adjust the direction of the camera lens, make the direction of the camera lens and line to
Angle between amount is in default angular range, wherein, the game role institute that the line vector is controlled by game player
Vector in position to the Mission Objective position.
2. according to the method described in claim 1, it is characterised in that described in the case where listening to the trigger event, adjust
Include before the direction of the whole camera lens:
Judge the line vector whether in default angular range;
If the line vector is not in the default angular range, by the camera lens carry out rotation until the line to
Amount is in the default angular range.
3. method according to claim 2, it is characterised in that the camera lens is so that the default angular range is in minimum angle
The direction of degree is rotated.
4. method according to claim 2, it is characterised in that the camera lens is subjected to rotation until at line vector
Include in the default angular range:
The camera lens is subjected to rotation until line vector is in the centre position in the default angular range.
5. according to the method described in claim 1, it is characterised in that in the case where listening to the trigger event, adjust institute
Stating the direction of camera lens includes:
Obtain the current angle towards between line vector of the camera lens;
Judge whether the size of the angle is equal to default angle value, wherein, the default angle value is to be in the default folder
The value of angle in angular region;
If it is judged that the angle is not equal to the default angle value, then the direction of the camera lens is rotated, until after adjustment
Angle between the direction of the camera lens and line vector is equal to the default angle value, wherein, the camera lens is so that institute
Default angular range is stated to be rotated in the direction of minimum angles.
6. method according to any one of claim 1 to 5, it is characterised in that the direction of the adjustment camera lens includes:
Control the camera lens to start rotation with predetermined initial velocity, and passed with the predetermined acceleration every predetermined frame number
Increase, the angle after the adjustment between the direction of the camera lens and line vector is in default angular range.
7. according to the method described in claim 1, it is characterised in that the monitoring trigger event includes:
The event that the Mission Objective performs operation to game role is monitored, wherein, the game role is the game player
The role of control;And/or
Monitor the event that the game role performs operation to the Mission Objective.
8. a kind of device of camera lens lock onto target, it is characterised in that including:
Module is monitored, for monitoring trigger event, wherein, the trigger event locks the event of Mission Objective for triggering camera lens;
Adjusting module, in the case where listening to the trigger event, adjusting the direction of the camera lens, wherein, adjust it
The angle between the direction of the camera lens and line vector is in default angular range afterwards, and the line vector is game player
Vector of the game role position controlled to the Mission Objective position.
9. device according to claim 8, it is characterised in that the adjusting module is used for:
Judge the line vector whether in default angular range;
If it is judged that the line vector is not in the default angular range, then the camera lens is entered according to predetermined direction
Row rotation is in the default angular range up to line vector,
Wherein, line vector and the angle of the direction of the camera lens after adjustment in the default angular range are in
In the default angular range, and the camera lens is so that the default angular range is rotated in the direction of minimum angles.
10. device according to claim 9, it is characterised in that the adjusting module is used for:
The camera lens is subjected to rotation until line vector is in the default angular range according to the predetermined direction
Centre position.
11. device according to claim 8, it is characterised in that the adjusting module is used for:
Obtain the current angle towards between line vector of the camera lens;
Judge whether the angle is equal to default angle, wherein, the default angle is in the default angular range
Angle;
If it is judged that the angle is not equal to the default angle, then according to predetermined direction rotate the camera lens direction until
Angle after adjustment between the direction of the camera lens and line vector is equal to the default angle, wherein, the camera lens
So that the default angular range is rotated in the direction of minimum angles.
12. the device according to any one of claim 8 to 11, it is characterised in that the adjusting module is used for:
Control the camera lens to start rotation with predetermined initial velocity, and passed with the predetermined acceleration every predetermined frame number
Increase, the angle after the adjustment between the direction of the camera lens and line vector is in default angular range.
13. device according to claim 8, it is characterised in that the monitoring module includes:
Monitor the event that the Mission Objective performs operation to the game role;And/or
Monitor the event that the game role performs operation to the Mission Objective.
14. a kind of storage medium, it is characterised in that program is preserved on the storage medium, is performed when described program is run
Method any one of claim 1 to 7.
15. a kind of processor, it is characterised in that side when described program is run any one of perform claim requirement 1 to 7
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710271135.5A CN107050861B (en) | 2017-04-24 | 2017-04-24 | Method, device, storage medium and processor for lens locking target |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710271135.5A CN107050861B (en) | 2017-04-24 | 2017-04-24 | Method, device, storage medium and processor for lens locking target |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107050861A true CN107050861A (en) | 2017-08-18 |
CN107050861B CN107050861B (en) | 2020-09-29 |
Family
ID=59604413
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710271135.5A Active CN107050861B (en) | 2017-04-24 | 2017-04-24 | Method, device, storage medium and processor for lens locking target |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107050861B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019154255A1 (en) * | 2018-02-09 | 2019-08-15 | 腾讯科技(深圳)有限公司 | Viewing angle adjustment method and device, and electronic device and computer-readable storage medium |
CN111939563A (en) * | 2020-08-13 | 2020-11-17 | 北京像素软件科技股份有限公司 | Target locking method, device, electronic equipment and computer readable storage medium |
US11845007B2 (en) | 2019-01-24 | 2023-12-19 | Tencent Technology (Shenzhen) Company Limited | Perspective rotation method and apparatus, device, and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070270215A1 (en) * | 2006-05-08 | 2007-11-22 | Shigeru Miyamoto | Method and apparatus for enhanced virtual camera control within 3d video games or other computer graphics presentations providing intelligent automatic 3d-assist for third person viewpoints |
US20120007882A1 (en) * | 2010-06-11 | 2012-01-12 | Nintendo Co., Ltd. | Computer-readable storage medium having information processing program stored therein, information processing apparatus, information processing system, and information processing method |
CN105676862A (en) * | 2016-04-01 | 2016-06-15 | 成都云图秀色科技有限公司 | Flight device control system and control method |
CN106292799A (en) * | 2016-08-25 | 2017-01-04 | 北京奇虎科技有限公司 | Unmanned plane, remote control unit and control method thereof |
CN106492457A (en) * | 2016-10-20 | 2017-03-15 | 北京乐动卓越科技有限公司 | A kind of implementation method of full 3D actions mobile phone games fight interactive system and device |
-
2017
- 2017-04-24 CN CN201710271135.5A patent/CN107050861B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070270215A1 (en) * | 2006-05-08 | 2007-11-22 | Shigeru Miyamoto | Method and apparatus for enhanced virtual camera control within 3d video games or other computer graphics presentations providing intelligent automatic 3d-assist for third person viewpoints |
US20120007882A1 (en) * | 2010-06-11 | 2012-01-12 | Nintendo Co., Ltd. | Computer-readable storage medium having information processing program stored therein, information processing apparatus, information processing system, and information processing method |
CN105676862A (en) * | 2016-04-01 | 2016-06-15 | 成都云图秀色科技有限公司 | Flight device control system and control method |
CN106292799A (en) * | 2016-08-25 | 2017-01-04 | 北京奇虎科技有限公司 | Unmanned plane, remote control unit and control method thereof |
CN106492457A (en) * | 2016-10-20 | 2017-03-15 | 北京乐动卓越科技有限公司 | A kind of implementation method of full 3D actions mobile phone games fight interactive system and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019154255A1 (en) * | 2018-02-09 | 2019-08-15 | 腾讯科技(深圳)有限公司 | Viewing angle adjustment method and device, and electronic device and computer-readable storage medium |
US11977713B2 (en) | 2018-02-09 | 2024-05-07 | Tencent Technology (Shenzhen) Company Limited | Viewing angle adjustment method and device, electronic device, and computer-readable storage medium |
US11845007B2 (en) | 2019-01-24 | 2023-12-19 | Tencent Technology (Shenzhen) Company Limited | Perspective rotation method and apparatus, device, and storage medium |
CN111939563A (en) * | 2020-08-13 | 2020-11-17 | 北京像素软件科技股份有限公司 | Target locking method, device, electronic equipment and computer readable storage medium |
CN111939563B (en) * | 2020-08-13 | 2024-03-22 | 北京像素软件科技股份有限公司 | Target locking method, device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107050861B (en) | 2020-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107680157B (en) | Live broadcast-based interaction method, live broadcast system and electronic equipment | |
US20200179812A1 (en) | User-driven spectator channel for live game play in multi-player games | |
WO2022022281A1 (en) | Game data processing method and apparatus, and computer and readable storage medium | |
CN106095235B (en) | control method and device based on virtual reality | |
CN107050861A (en) | Method, device, storage medium and the processor of camera lens lock onto target | |
JP7061674B2 (en) | Viewing angle adjustment methods and devices, storage media, and electronic devices | |
CN106951316B (en) | Virtual mode and real mode switching method and device and virtual reality equipment | |
JP6232423B2 (en) | Information processing apparatus, drawing apparatus, method, and program | |
JP6576245B2 (en) | Information processing apparatus, control method, and program | |
CN111888762A (en) | Method for adjusting visual angle of lens in game and electronic equipment | |
CN111228811B (en) | Virtual object control method, device, equipment and medium | |
CN108187343A (en) | Data interactive method and device, storage medium and electronic device | |
CN106507178B (en) | Video broadcasting method and device | |
EP2044543A2 (en) | Method and apparatus for providing gaming services and for handling video content | |
CN105915766A (en) | Control method and device based on virtual reality | |
WO2018196658A1 (en) | Virtual reality media file generation method and device, storage medium, and electronic device | |
US20230076026A1 (en) | Image processing method and apparatus | |
CN107213636A (en) | Camera lens moving method, device, storage medium and processor | |
CN108144303A (en) | Exchange method and device, storage medium and electronic device between account number of playing | |
CN107911374A (en) | Method of data synchronization and device, storage medium and electronic device | |
CN112221131B (en) | Visual angle switching method and device and computer readable storage medium | |
CN108786108B (en) | Target object control method, device, storage medium and equipment | |
CN111111173A (en) | Information display method, device and storage medium for virtual reality game | |
CN106340063A (en) | Sharing method and sharing device | |
US20230152880A1 (en) | Policing the extended reality interactions |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |