CN109126120B - Motor control method and related product - Google Patents

Motor control method and related product Download PDF

Info

Publication number
CN109126120B
CN109126120B CN201810941200.5A CN201810941200A CN109126120B CN 109126120 B CN109126120 B CN 109126120B CN 201810941200 A CN201810941200 A CN 201810941200A CN 109126120 B CN109126120 B CN 109126120B
Authority
CN
China
Prior art keywords
target
game
motion
prop
motor
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.)
Expired - Fee Related
Application number
CN201810941200.5A
Other languages
Chinese (zh)
Other versions
CN109126120A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810941200.5A priority Critical patent/CN109126120B/en
Publication of CN109126120A publication Critical patent/CN109126120A/en
Application granted granted Critical
Publication of CN109126120B publication Critical patent/CN109126120B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/25Output arrangements for video game devices
    • A63F13/28Output arrangements for video game devices responding to control signals received from the game device for affecting ambient conditions, e.g. for vibrating players' seats, activating scent dispensers or affecting temperature or light
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • A63F13/426Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle involving on-screen location information, e.g. screen coordinates of an area at which the player is aiming with a light gun
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
    • A63F2300/302Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device specially adapted for receiving control signals not targeted to a display device or game input means, e.g. vibrating driver's seat, scent dispenser

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Toys (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a motor control method and a related product, wherein the method comprises the following steps: when the electronic equipment runs the target game, the motion trail of the target prop in the target game is obtained, the motion parameters of the motor of the electronic equipment are determined according to the motion trail, and the motor is controlled to move according to the motion parameters.

Description

Motor control method and related product
Technical Field
The application relates to the technical field of games, in particular to a motor control method and a related product.
Background
With the widespread use of electronic devices (such as mobile phones, tablet computers, etc.), the electronic devices have more and more applications and more powerful functions, and the electronic devices are developed towards diversification and personalization, becoming indispensable electronic products in the life of users,
at present, a user plays games through electronic equipment is quite common, and as scenes in the games are richer, the electronic equipment is difficult to vividly present the scenes in the games, so that the game experience of the user is poor.
Disclosure of Invention
The embodiment of the application provides a motor control method and a related product, which can control the motion of a motor of electronic equipment in a game, enhance the presentation effect of a game scene and improve the user experience.
In a first aspect, an embodiment of the present application provides a motor control method, including:
when the electronic equipment runs a target game, acquiring a motion track of a target prop in the target game;
determining a motion parameter of a motor of the electronic equipment according to the motion track;
and controlling the motor to move according to the motion parameters.
In a second aspect, an embodiment of the present application provides a motor control apparatus applied to an electronic device, including:
the electronic equipment comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring the motion track of a target prop in a target game when the electronic equipment runs the target game;
the determining unit is used for determining the motion parameters of a motor of the electronic equipment according to the motion track;
and the control unit is used for controlling the motor to move according to the motion parameters.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, according to the motor control method and the related product described in the embodiments of the present application, when the electronic device runs the target game, the motion trajectory of the target prop in the target game is obtained, the motion parameter of the motor of the electronic device is determined according to the motion trajectory, and the motor is controlled to move according to the motion parameter.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 1B is a schematic flow chart of a motor control method disclosed in an embodiment of the present application;
FIG. 1C is a schematic illustration of a demonstration of a game scenario disclosed in an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of another motor control method disclosed in an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of another motor control method disclosed in an embodiment of the present application;
fig. 4 is a schematic structural diagram of another electronic device disclosed in the embodiments of the present application;
fig. 5 is a schematic structural diagram of a motor control device disclosed in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein may be combined with other embodiments.
The electronic device according to the embodiment of the present application may include various handheld devices (e.g., smart phones), vehicle-mounted devices, Virtual Reality (VR)/Augmented Reality (AR) devices, wearable devices, computing devices or other processing devices connected to wireless modems, and various forms of User Equipment (UE), Mobile Stations (MSs), terminal devices (terminal devices), development/test platforms, servers, and so on, which have wireless communication functions. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device includes a control circuit and an input-output circuit, and the input-output circuit is connected to the control circuit.
The control circuitry may include, among other things, storage and processing circuitry. The storage circuit in the storage and processing circuit may be a memory, such as a hard disk drive memory, a non-volatile memory (e.g., a flash memory or other electronically programmable read only memory used to form a solid state drive, etc.), a volatile memory (e.g., a static or dynamic random access memory, etc.), etc., and the embodiments of the present application are not limited thereto. Processing circuitry in the storage and processing circuitry may be used to control the operation of the electronic device. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuitry may be used to run software in the electronic device, such as play incoming call alert ringing application, play short message alert ringing application, play alarm alert ringing application, play media file application, Voice Over Internet Protocol (VOIP) phone call application, operating system functions, and so forth. The software may be used to perform some control operations, such as playing an incoming alert ring, playing a short message alert ring, playing an alarm alert ring, playing a media file, making a voice phone call, and performing other functions in the electronic device, and the embodiments of the present application are not limited.
The input-output circuit can be used for enabling the electronic device to input and output data, namely allowing the electronic device to receive data from the external device and allowing the electronic device to output data from the electronic device to the external device.
The input-output circuit may further include a sensor. The sensors may include ambient light sensors, optical and capacitive based infrared proximity sensors, ultrasonic sensors, touch sensors (e.g., optical based touch sensors and/or capacitive touch sensors, where the touch sensors may be part of a touch display screen or may be used independently as a touch sensor structure), acceleration sensors, gravity sensors, and other sensors, etc. The input-output circuit may further include audio components that may be used to provide audio input and output functionality for the electronic device. The audio components may also include a tone generator and other components for generating and detecting sound.
The input-output circuit may further include one or more motors, where the motors may include a conventional vibration motor, a linear vibration motor, and a voice coil motor, where the conventional vibration motor is used to vibrate the mobile phone, the linear vibration motor is a driving device that directly converts electrical energy into linear motion kinetic energy by using an electromagnetic action principle, and compared with the conventional vibration motor, the voice coil motor is a device that converts electrical energy into mechanical energy and realizes linear and limited swing angle motion, and can drive a camera of an electronic device to realize auto-focusing.
The input-output circuitry may also include one or more display screens. The display screen can comprise one or a combination of a liquid crystal display screen, an organic light emitting diode display screen, an electronic ink display screen, a plasma display screen and a display screen using other display technologies. The display screen may include an array of touch sensors (i.e., the display screen may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
The input-output circuitry may further include communications circuitry that may be used to provide the electronic device with the ability to communicate with external devices. The communication circuitry may include analog and digital input-output interface circuitry, and wireless communication circuitry based on radio frequency signals and/or optical signals. The wireless communication circuitry in the communication circuitry may include radio frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless communication circuitry in the communication circuitry may include circuitry to support Near Field Communication (NFC) by transmitting and receiving near field coupled electromagnetic signals. For example, the communication circuit may include a near field communication antenna and a near field communication transceiver. The communications circuitry may also include cellular telephone transceiver and antennas, wireless local area network transceiver circuitry and antennas, and so forth.
The input-output circuit may further include other input-output units. Input-output units may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, and the like.
The electronic device may further include a battery (not shown) for supplying power to the electronic device.
The following describes embodiments of the present application in detail.
Referring to fig. 1B, fig. 1B is a schematic flowchart of a motor control method disclosed in an embodiment of the present application, applied to the electronic device described in fig. 1A, where the motor control method includes the following steps:
101. when the electronic equipment runs a target game, the motion trail of the target prop in the target game is obtained.
The target game is a game in which the current electronic device is running in the foreground, generally, the target game includes a plurality of game props, the target props refer to game props that can be vibrated by a motor to present the motion effect of the props in the game in the target game, for example, when some game scenes include game operations of launching missiles, shells or bullets, the target props may include game props such as missiles, shells or bullets, and the missiles, shells or bullets may move in the game scenes, so that the motion trail of the target props in the target game can be obtained.
Optionally, in step 101, the obtaining a motion trajectory of the target item in the target game may include the following steps:
11. acquiring preset game configuration data corresponding to the target prop in the target game;
12. and determining the motion trail according to the preset game configuration data.
In the target game, the motion of the target prop may be a preset operation, and for such target props, the motion trajectory of the target prop may be determined according to game configuration data corresponding to the preset target prop, specifically, the game configuration data of the target prop may be preset, so that when the target game runs to a preset game progress, the target prop is automatically triggered to move, for example, when the target prop is a missile or a cannonball, and when the game runs to a specific game progress, the game operation of launching the missile or the cannonball is triggered according to the game configuration data, the motion trajectory of the missile or the cannonball is set in the game configuration data, and the game configuration data may include at least one of the following: optionally, in a specific implementation, for a specific prop, such as a missile or a shell, the game configuration data may further include explosion time of the missile or the shell, power values of the missile or the shell during explosion, and image and sound presentation effects corresponding to different power values are different, and of course, the game configuration data of the target prop may further include other data, which is not limited here, so that the motion trajectory of the target prop may be determined according to the preset game configuration data, for example, a preset position of the missile or the shell in a game scene may be set to be transmitted to a target object in the game, the motion trajectory of the target prop may be a motion trajectory from the preset position to a position of the target object, where the target object may include a game character in the target game, such as a game character of a user, for another example, in a game scene including a plurality of game characters, when a target item such as a missile or a cannonball is set to be launched to a direction of another game character except for the game character of the user, a motion track of the target item moving to the direction of the other game character is determined according to the game configuration data, so that a game effect can be more realistically presented to the preset game scene of the target game.
Optionally, the motion trajectory determined according to the preset game configuration data may be a straight trajectory, a curved trajectory with a radian, such as a parabolic trajectory, or a trajectory that changes direction due to acting force with other props in the game scene during the motion process, which is not limited herein, and it can be understood that different motion trajectories may present different position changes of the target prop in the game scene.
Optionally, in step 101, the obtaining a motion trajectory of the target item in the target game may include the following steps:
13. receiving an operation instruction of a user for the target prop, wherein the operation instruction is used for indicating the target prop to move in a game scene of the target game;
14. and determining the motion track of the target prop according to the operation instruction.
Wherein, in the game scene of the target game, the motion of the target prop can be triggered by the operation instruction of the user aiming at the target prop, for example, when the user needs to shoot bullets, the user can trigger the operation instruction by virtual keys in the game interface on the display screen, the operation instruction can include operation instructions for controlling shooting times, shooting direction and shooting fire value, for example, one shooting virtual key is clicked once to indicate to shoot a bullet in the game, so that the user can continuously click to continuously shoot, the shooting fire value can be selected by the user from a plurality of preset fire value ranges, or different firearms for shooting bullets can be preset to correspond to different fire values, after the user selects the firearms, the firepower value corresponding to the bullet can be determined, the motion distances of the bullets corresponding to the different fire values are different, and the corresponding picture and sound presentation effects are different, therefore, the movement track of the target prop can be determined according to the operation instruction of the user, specifically, the position of the game role of the user when the user triggers the operation instruction can be determined, then the movement track of the target prop can be determined according to the position of the game role and the operation instruction of controlling the movement direction of the target prop by the user, for example, when the user triggers the operation of bullet shooting, the movement track of a bullet can be determined according to the operation instruction of controlling the shooting times, the shooting direction and the shooting fire value of the bullet.
102. And determining the motion parameters of a motor of the electronic equipment according to the motion track.
Wherein, the motion parameter of the motor may include at least one of the following: the vibration amplitude of the motor, the vibration frequency of the motor, the working power of the motor, the moving direction of the motor, etc., without limitation.
In the embodiment of the application, consider in the game scene, move to different positions when the target stage property, can demonstrate different sound effects, therefore, can carry out corresponding setting with the motion parameter of motor, thereby, can confirm the motion parameter of motor according to the motion trail of target stage property, concretely, move to the direction of user's game role when the target stage property, in order to demonstrate the sound effect that the target stage property corresponds more lifelikely, the volume can be along with the target stage property is close to target object littleer, move to the direction of keeping away from target object when the target stage property, can set up the volume and be along with the target stage property is close to target object littleer, and then, the motion parameter of motor can correspond the different presentation effect of target stage property.
Optionally, when the target object is in a game scene, in step 102, determining a motion parameter of a motor of the electronic device according to the motion trajectory may include the following steps:
21. acquiring a first position of a target object;
22. determining the position relationship between the target prop and the target object at each moment in a plurality of moments in the motion process according to the motion track and the first position to obtain a plurality of position relationships;
23. and determining the motion parameters of the motor of the electronic equipment at each moment in the plurality of moments according to the plurality of position relations.
The position relationship between the target object and the target prop may include a distance and an orientation relationship between the target objects, and the orientation relationship may include that the target prop is located in front of, behind, on the left and on the right of the target prop, on the left front, on the right front, on the left rear, on the right rear, above and below the target prop, and the like, which is not limited herein.
In the embodiment of the application, when the target object is a game role of a user, in order to enable the user to hear different sound effects presented by prop motion at different positions from the angle of the game role, the first position of the target object can be obtained, the first position can be determined according to a virtual map in a target game, the electronic device can obtain a map corresponding to a game scene, a coordinate position corresponding to the target object is determined in the map, then the change of the position relationship between the target prop and the target object along with the motion of the target prop is determined, the position relationship between the target prop and the target object can generate the change of approaching and departing at different moments, along with the change of the position relationship, the motion parameters of motors corresponding to different position relationships can be determined, and the presentation effect of the position change can be enhanced by the motion effect of the motors. In specific implementation, when the target object is moving, the position relationship of the target object may also change, the first position of the target object may be dynamically obtained, and the position relationship between the target item and the target object at each time may be determined according to the movement trajectory and the first position of the target item at each time.
Wherein, the motion parameter of the motor of the electronic equipment at each moment in a plurality of moments is determined according to a plurality of position relations, a plurality of different position relations and corresponding relations between the motion parameters can be preset, then, the motion parameter corresponding to each position relation is determined according to the corresponding relation, for example, when the distance between the target object and the target prop is closer, the larger the vibration amplitude of the motor can be set, and for example, the corresponding relation between the motion direction of the motor and the motion direction of the target prop can be set, so that the motion direction of the target prop can be determined according to the motion track, the direction of movement of the motor corresponding to the direction of movement of the target object is then determined, again, for example, as the distance between the target object and the target object gets closer, the larger the vibration frequency or the working power of the motor can be set, and the farther the distance between the target object and the target prop is, the smaller the vibration frequency or the working power of the motor can be set.
Optionally, the motion parameter includes a vibration amplitude of the motor, and in step 102, the determining the motion parameter of the motor of the electronic device according to the motion trajectory may further include:
24. acquiring the frequency of the electronic equipment for receiving the operation instruction in a preset time period;
25. determining the vibration amplitude according to the frequency.
In a specific game scene, when the electronic device receives an operation instruction continuously triggered by a user, different frequencies can be set to correspond to different vibration amplitudes of the motors, for example, the higher the frequency for receiving the operation instruction is, the larger the vibration amplitude of the motor is, so that the user can feel a more realistic game scene through the vibration of the motor when shooting at a high frequency.
103. And controlling the motor to move according to the motion parameters.
In the embodiment of the application, when the electronic equipment runs the target game, sound configuration data may be set for different game props in the target game, so that a user can experience vivid sound effects of the game in the game playing process.
For example, when the electronic device detects that a missile, a shell, or a bullet is to be fired, a motion parameter of the motor may be determined according to a motion trajectory of a target object such as the missile, the shell, or the bullet, please refer to fig. 1C, as shown in fig. 1C, for a schematic diagram illustrating a game scene provided in an embodiment of the present application, as shown in fig. 1C, when the shell flies to the target object, a vibration amplitude of the motor may become larger, the target object fires the bullet, as the bullet gets away from the target object, the vibration amplitude of the motor may become smaller, and then the motor is controlled to move according to the motion parameter, so that a user can feel the motion of the motor in the game scene in which the missile, shell, or the bullet is fired, and thus can experience a game effect more realistically.
It can be seen that, according to the motor control method described in the embodiment of the present application, when the electronic device runs the target game, the motion trajectory of the target prop in the target game is obtained, the motion parameter of the motor of the electronic device is determined according to the motion trajectory, and the motor is controlled to move according to the motion parameter.
Consistent with the above, fig. 2 is a schematic flow chart of a motor control method disclosed in the embodiment of the present application. Applied to the electronic device shown in fig. 1A, the motor control method includes the steps of:
201. when the electronic equipment runs a target game, preset game configuration data corresponding to the target prop in the target game are obtained.
202. And determining the motion trail according to the preset game configuration data.
203. And determining the motion parameters of a motor of the electronic equipment according to the motion track.
204. And controlling the motor to move according to the motion parameters.
The detailed descriptions of the steps 201 to 204 may refer to the corresponding descriptions of the motor control method described in fig. 1B, and are not repeated herein.
It can be seen that, according to the motor control method described in the embodiment of the present application, when the electronic device runs a target game, preset game configuration data corresponding to a target prop in the target game is obtained, a motion trajectory is determined according to the preset game configuration data, a motion parameter of a motor of the electronic device is determined according to the motion trajectory, and the motor is controlled to move according to the motion parameter.
Consistent with the above, fig. 3 is a schematic flow chart of a motor control method disclosed in the embodiment of the present application. Applied to the electronic device shown in fig. 1A, the motor control method includes the steps of:
301. when the electronic equipment runs a target game, receiving an operation instruction of a user for the target prop, wherein the operation instruction is used for indicating the target prop to move in a game scene of the target game.
302. And determining the motion track of the target prop according to the operation instruction.
303. A first position of a target object is obtained.
304. And determining the position relationship between the target prop and the target object at each moment in a plurality of moments in the motion process according to the motion track and the first position to obtain a plurality of position relationships.
305. Determining a motion parameter of a motor of the electronic equipment at each moment in the plurality of moments according to the plurality of position relations;
306. and controlling the motor to move according to the motion parameters.
The detailed descriptions of steps 301 to 306 may refer to the corresponding descriptions of the motor control method described in fig. 1B, and are not repeated herein.
It can be seen that, in the motor control method described in the embodiment of the present application, when the electronic device runs the target game, an operation instruction of a user for the target prop is received, where the operation instruction is used to instruct the target prop to move in a game scene of the target game, a motion trajectory of the target prop is determined according to the operation instruction, a first position of the target object is obtained, a position relationship between each of multiple times of the motion process of the target prop and the target object is determined according to the motion trajectory and the first position, multiple position relationships are obtained, a motion parameter of a motor of the electronic device at each of the multiple times is determined according to the multiple position relationships, and the motor is controlled to move according to the motion parameter, so that, in the running process of the target game, a presentation effect of the game scene is enhanced by controlling the motion of the motor of the electronic device, thereby promoting the gaming experience for the user.
Referring to fig. 4, fig. 4 is a schematic structural diagram of another electronic device disclosed in the embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for performing the following steps:
when the electronic equipment runs a target game, acquiring a motion track of a target prop in the target game;
determining a motion parameter of a motor of the electronic equipment according to the motion track;
and controlling the motor to move according to the motion parameters.
In one possible example, in the aspect of obtaining the motion trail of the target prop in the target game, the program includes instructions for executing the following steps:
acquiring preset game configuration data corresponding to the target prop in the target game;
and determining the motion trail according to the preset game configuration data.
In one possible example, in the aspect of obtaining the motion trail of the target prop in the target game, the program includes instructions for executing the following steps:
receiving an operation instruction of a user for the target prop, wherein the operation instruction is used for indicating the target prop to move in a game scene of the target game;
and determining the motion track of the target prop according to the operation instruction.
In one possible example, in said determining a motion parameter of a motor of the electronic device from the motion profile, the above program comprises instructions for:
acquiring a first position of a target object;
determining the position relationship between the target prop and the target object at each moment in a plurality of moments in the motion process according to the motion track and the first position to obtain a plurality of position relationships;
and determining the motion parameters of the motor of the electronic equipment at each moment in the plurality of moments according to the plurality of position relations.
In one possible example, the motion parameter comprises a vibration amplitude of the motor, and in the determining the motion parameter of the motor of the electronic device according to the motion trajectory, the program comprises instructions for:
acquiring the frequency of the electronic equipment for receiving the operation instruction in a preset time period;
determining the vibration amplitude according to the frequency.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a motor control apparatus disclosed in an embodiment of the present application, applied to the electronic device shown in fig. 1A, where the motor control apparatus 500 includes an obtaining unit 501, a determining unit 502, and a control unit 503, where,
the obtaining unit 501 is configured to obtain a motion trajectory of a target item in a target game when the electronic device runs the target game;
the determining unit 502 is configured to determine a motion parameter of a motor of the electronic device according to the motion trajectory;
the control unit 503 is configured to control the motor to move according to the motion parameter.
In one possible example, in the aspect of acquiring the motion trajectory of the target item in the target game, the acquiring unit 501 is specifically configured to:
acquiring preset game configuration data corresponding to the target prop in the target game;
and determining the motion trail according to the preset game configuration data.
In a possible embodiment, in the aspect of acquiring the motion trajectory of the target item in the target game, the acquiring unit 501 is specifically configured to:
receiving an operation instruction of a user for the target prop, wherein the operation instruction is used for indicating the target prop to move in a game scene of the target game;
and determining the motion track of the target prop according to the operation instruction.
In a possible example, the determining unit 502 is specifically configured to determine a motion parameter of a motor of the electronic device according to the motion trajectory, and to:
acquiring a first position of a target object;
determining the position relationship between the target prop and the target object at each moment in a plurality of moments in the motion process according to the motion track and the first position to obtain a plurality of position relationships;
and determining the motion parameters of the motor of the electronic equipment at each moment in the plurality of moments according to the plurality of position relations.
In a possible example, the motion parameter includes a vibration amplitude of the motor, the motion parameter of the motor of the electronic device is determined according to the motion trajectory, and the determining unit 502 is specifically configured to:
acquiring the frequency of the electronic equipment for receiving the operation instruction in a preset time period;
determining the vibration amplitude according to the frequency.
When the electronic equipment runs the target game, the motion trail of the target prop in the target game is obtained, the motion parameters of the motor of the electronic equipment are determined according to the motion trail, and the motor is controlled to move according to the motion parameters.
It should be noted that the electronic device described in the embodiments of the present application is presented in the form of a functional unit. The term "unit" as used herein is to be understood in its broadest possible sense, and objects used to implement the functions described by the respective "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
The obtaining unit 501, the determining unit 502 and the control unit 503 may be control circuits or processors.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the motor control methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the motor control methods as set forth in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. A motor control method is applied to electronic equipment, and the method comprises the following steps:
when the electronic equipment runs a target game, obtaining a motion track of a target prop in the target game, wherein the target prop is a game prop included in a game scene in the target game, the motion of the game prop is game configuration data of the preset target prop, the target prop is automatically triggered to move when the target game runs to a preset game progress, the motion comprises the steps of triggering the launching of the game prop and the game operation of explosion according to the game configuration data when the target game runs to a specific game progress, and the launching, the explosion time and the power value of the game prop are different, and the corresponding pictures and sounds are different;
determining a motion parameter of a motor of the electronic device according to the motion trajectory, specifically including: obtaining a first position of a target object, determining a position relation between the target prop and the target object at each of a plurality of moments in a motion process according to the motion track and the first position, and obtaining a plurality of position relations, determining a change of the position relation between the target prop and the target object along with the motion of the target prop when the target object is in a motion state, and determining a motion parameter of a motor of the electronic device at each of the plurality of moments according to the plurality of position relations, wherein the plurality of position relations and the motion parameter are preset and correspond to each other, the plurality of position relations comprise a distance between the target object and the target prop and a motion direction of the target prop determined according to the motion track, and when a shell or bullet in the game prop moves close to the target object, the vibration amplitude of the motor is increased, the target object ejects the cannonball or bullet in the game prop, the vibration amplitude of the motor is reduced along with the distance of the cannonball or bullet from the target object, the motor is controlled to execute different motion states according to different positions of the motion parameters on a motion trail, and the game prop moves to different positions on the motion trail to present different sounds and corresponds to different motion parameters of the motor;
and controlling the motor to move according to the motion parameters.
2. The method of claim 1, wherein the obtaining of the motion trajectory of the target prop in the target game comprises:
acquiring preset game configuration data corresponding to the target prop in the target game;
and determining the motion trail according to the preset game configuration data.
3. The method of claim 1, wherein the obtaining of the motion trajectory of the target prop in the target game comprises:
receiving an operation instruction of a user for the target prop, wherein the operation instruction is used for indicating the target prop to move in a game scene of the target game;
and determining the motion track of the target prop according to the operation instruction.
4. The method of claim 3, wherein the motion parameter comprises a vibration amplitude of the motor, wherein determining the motion parameter of the motor of the electronic device from the motion profile further comprises:
acquiring the frequency of the electronic equipment for receiving the operation instruction in a preset time period;
determining the vibration amplitude according to the frequency.
5. A motor control device, applied to an electronic apparatus, comprising:
the electronic equipment comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a motion track of a target prop in a target game when the electronic equipment runs the target game, the target prop is a game prop included in a game scene in the target game, the motion of the game prop is game configuration data of the preset target prop, the target prop is automatically triggered to move when the target game runs to a preset game progress, the motion comprises launching of the game prop and game operation of explosion which are triggered according to the game configuration data when the target game runs to a specific game progress, and pictures and sounds corresponding to different launching, explosion time and power values during explosion of the game prop are different;
the determining unit is configured to determine a motion parameter of a motor of the electronic device according to the motion trajectory, and specifically includes: obtaining a first position of a target object, determining a position relation between the target prop and the target object at each of a plurality of moments in a motion process according to the motion track and the first position, and obtaining a plurality of position relations, determining a change of the position relation between the target prop and the target object along with the motion of the target prop when the target object is in a motion state, and determining a motion parameter of a motor of the electronic device at each of the plurality of moments according to the plurality of position relations, wherein the plurality of position relations and the motion parameter are preset and correspond to each other, the plurality of position relations comprise a distance between the target object and the target prop and a motion direction of the target prop determined according to the motion track, and when a shell or bullet in the game prop moves close to the target object, the vibration amplitude of the motor is increased, the target object ejects the cannonball or bullet in the game prop, the vibration amplitude of the motor is reduced along with the distance of the cannonball or bullet from the target object, the motor is controlled to execute different motion states according to different positions of the motion parameters on a motion trail, and the game prop moves to different positions on the motion trail to present different sounds and corresponds to different motion parameters of the motor;
and the control unit is used for controlling the motor to move according to the motion parameters.
6. The apparatus according to claim 5, wherein, in the obtaining of the motion trajectory of the target item in the target game, the obtaining unit is specifically configured to:
acquiring preset game configuration data corresponding to the target prop in the target game;
and determining the motion trail according to the preset game configuration data.
7. The apparatus according to claim 5, wherein, in the obtaining of the motion trajectory of the target item in the target game, the obtaining unit is specifically configured to:
receiving an operation instruction of a user for the target prop, wherein the operation instruction is used for indicating the target prop to move in a game scene of the target game;
and determining the motion track of the target prop according to the operation instruction.
8. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-4.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-4.
CN201810941200.5A 2018-08-17 2018-08-17 Motor control method and related product Expired - Fee Related CN109126120B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810941200.5A CN109126120B (en) 2018-08-17 2018-08-17 Motor control method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810941200.5A CN109126120B (en) 2018-08-17 2018-08-17 Motor control method and related product

Publications (2)

Publication Number Publication Date
CN109126120A CN109126120A (en) 2019-01-04
CN109126120B true CN109126120B (en) 2022-06-03

Family

ID=64790252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810941200.5A Expired - Fee Related CN109126120B (en) 2018-08-17 2018-08-17 Motor control method and related product

Country Status (1)

Country Link
CN (1) CN109126120B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489845A (en) * 2019-08-09 2019-11-22 瑞声科技(新加坡)有限公司 Motor vibrations model building method, sense of touch implementation method and its device
CN111385418B (en) * 2020-05-28 2020-09-18 北京小米移动软件有限公司 Vibration method, system and device for mobile terminal
CN111659122B (en) * 2020-07-09 2023-09-22 腾讯科技(深圳)有限公司 Virtual resource display method and device, electronic equipment and storage medium
CN112767430A (en) * 2021-01-06 2021-05-07 维沃移动通信有限公司 Information prompting method and device
CN114100128B (en) * 2021-12-09 2023-07-21 腾讯科技(深圳)有限公司 Prop special effect display method, device, computer equipment and storage medium
CN114870396A (en) * 2022-03-22 2022-08-09 上海艾为电子技术股份有限公司 Motor driving method and system, and electronic device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5554009B2 (en) * 2009-05-01 2014-07-23 株式会社タイトー Game system
CN102755744B (en) * 2012-06-25 2015-11-25 惠州Tcl移动通信有限公司 A kind of method, system and mobile terminal of controlling of playing
JP5864406B2 (en) * 2012-12-18 2016-02-17 株式会社コナミデジタルエンタテインメント GAME DEVICE, GAME CONTROL PROGRAM, AND GAME CONTROL DEVICE
CN104144145A (en) * 2013-05-08 2014-11-12 上海恺达广告有限公司 Method and system for playing online game through palm mobile terminal
CN105046059B (en) * 2015-06-24 2017-09-29 深圳市腾讯计算机系统有限公司 Play sport track determines method and device
CN106681486A (en) * 2015-11-11 2017-05-17 中兴通讯股份有限公司 Terminal vibration control method and device and terminal
CN105498205B (en) * 2015-12-10 2020-04-24 联想(北京)有限公司 Electronic game control equipment and control method
CN206391542U (en) * 2017-01-12 2017-08-11 深圳游视虚拟现实技术有限公司 A kind of reality-virtualizing game rocket launcher
CN107930119B (en) * 2017-11-21 2021-04-06 网易(杭州)网络有限公司 Information processing method, information processing device, electronic equipment and storage medium
CN108320607A (en) * 2018-02-07 2018-07-24 威海歌尔创客学院有限公司 A kind of suspension bridge experiential method and virtual reality suspension bridge experiencing system

Also Published As

Publication number Publication date
CN109126120A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN109126120B (en) Motor control method and related product
US10870053B2 (en) Perspective mode switching method and terminal
US10769833B2 (en) Method and apparatus for processing display of resource in animation, and terminal
CN106412681B (en) Live bullet screen video broadcasting method and device
CN110141859B (en) Virtual object control method, device, terminal and storage medium
CN111282275A (en) Method, device, equipment and storage medium for displaying collision traces in virtual scene
CN111475573B (en) Data synchronization method and device, electronic equipment and storage medium
US11426673B2 (en) Device control system, method, and apparatus, and control device
CN111265857B (en) Trajectory control method, device, equipment and storage medium in virtual scene
CN111202975B (en) Method, device and equipment for controlling foresight in virtual scene and storage medium
CN110917619A (en) Interactive property control method, device, terminal and storage medium
CN109067984B (en) Data transmission method, electronic device and computer readable storage medium
CN103473804A (en) Image processing method, device and terminal equipment
CN104375811A (en) Method and device for processing sound effects
CN110850980B (en) Mobile terminal control method, mobile terminal and storage medium
CN111526426A (en) Video playing method, terminal equipment and storage medium
CN107562303B (en) Method and device for controlling element motion in display interface
CN109358913B (en) Application program starting method and terminal equipment
CN111659122B (en) Virtual resource display method and device, electronic equipment and storage medium
CN111672115B (en) Virtual object control method and device, computer equipment and storage medium
CN113296664A (en) Screen resolution adjusting method and device, terminal equipment and storage medium
CN104978488A (en) Game role behavior analyzing method and apparatus
CN109088984A (en) Camera control method and Related product
CN109286841B (en) Movie sound effect processing method and related product
CN114288659A (en) Interaction method, device, equipment, medium and program product based on virtual object

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220603