Method, apparatus, device and storage medium for interactive control
Patent Information
- Application Number
- CN202310334195.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-03-30
AI Technical Summary
[0007]应当理解,本内容部分中所描述的内容并非旨在限定本公开的实施例的关键特征或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的描述而变得容易理解。
Smart Images

Figure CN116360608B_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments disclosed herein generally relate to the field of computers, and more particularly to methods, apparatus and devices for interaction. Background Technology
[0002] Currently, in many scenarios, interaction requires users to manipulate joysticks mounted on interactive devices. For example, in virtual environments that blend virtual content with real-world scenes to provide a unique sensory experience (such as virtual reality (VR) or augmented reality (AR) technologies), users can use joysticks on their interactive devices to perform actions within the virtual environment. In such scenarios, the ability of the interactive device to provide precise and flexible control becomes crucial. Summary of the Invention
[0003] In a first aspect of this disclosure, a method for interaction is provided. The method includes: determining an offset of a joystick in a preset direction; controlling a virtual object to perform a first action corresponding to the preset direction in response to the offset exceeding the first threshold; determining that the offset of the joystick in the preset direction decreases to less than the second threshold, the second threshold being different from the first threshold; and controlling the virtual object to perform a second action corresponding to the preset direction in response to detecting an increase in the offset of the joystick in the preset direction.
[0004] In a second aspect of this disclosure, an apparatus for interaction is provided. The apparatus includes: a first determining module configured to determine an offset of a joystick in a preset direction; a first control module configured to control a virtual object to perform a first action corresponding to the preset direction in response to the offset exceeding a first threshold; a second determining module configured to determine that the offset of the joystick in the preset direction decreases to less than a second threshold, the second threshold being different from the first threshold; and a second control module configured to control the virtual object to perform a second action corresponding to the preset direction in response to detecting an increase in the offset of the joystick in the preset direction.
[0005] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method described in the first aspect.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in the first aspect.
[0007] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0008] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented; Figures 2 to 4 A schematic diagram illustrating an interaction process in a virtual environment according to some embodiments of the present disclosure is shown; Figure 5 A flowchart is shown illustrating an example process for interaction according to some embodiments of the present disclosure; Figure 6 Block diagrams of devices for interaction according to some embodiments of the present disclosure are shown; and Figure 7 A block diagram of an apparatus capable of implementing several embodiments of the present disclosure is shown. Detailed Implementation
[0009] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0010] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0011] In the description of embodiments of this disclosure, the term "virtual environment" includes, but is not limited to, "VR," "AR," etc. It should be understood that the term "virtual environment" can be either "VR" or "AR," or any combination thereof. In the following description, for ease of description only, the term "virtual environment" is used in embodiments of this disclosure to refer to one or more of "VR" and "AR," or any combination thereof.
[0012] The term "in response to" indicates that a corresponding event has occurred or a condition has been met. It will be understood that the timing of subsequent actions performed in response to this event or condition is not necessarily strongly correlated with the time when the event or condition is met. In some cases, subsequent actions may be performed immediately upon the occurrence of the event or the fulfillment of the condition; in other cases, they may be performed some time after the event or condition has occurred.
[0013] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0014] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.
[0015] In current methods of controlling objects (such as virtual objects in a virtual scene) using a joystick, a threshold is typically set because the joystick generates input within a certain range. Movement of the controlled object (e.g., a change of direction) is only triggered when the joystick input exceeds the threshold.
[0016] If the threshold is set too low, some joystick input may be lost when the user quickly rotates the joystick, resulting in a sluggish joystick control experience. Conversely, if the threshold is set too high, the user may need to input a large value to trigger the movement of the controlled object, thus failing to achieve a smooth, gliding rotation effect. These issues lead to a poor user experience when interacting with the joystick.
[0017] To address the aforementioned and other potential problems, embodiments of this disclosure provide a scheme for interaction in a virtual scene. This scheme determines the offset of a joystick in a preset direction. If the joystick offset exceeds a first threshold, the virtual object is controlled to perform a first action corresponding to the preset direction. The scheme also determines if the joystick offset in the preset direction decreases to less than a second threshold different from the first threshold. If an increase in the joystick offset in the preset direction is detected, the virtual object is controlled to perform a second action corresponding to the preset direction.
[0018] Example embodiments of this disclosure are described below with reference to the accompanying drawings.
[0019] Figure 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. The example environment 100 includes a user 102 and an electronic device 110. In this example environment 100, the electronic device 110 has an application (hereinafter referred to as a control module) installed and running that supports virtual environments, thereby enabling the presentation of a virtual environment 120 at or from the electronic device 110 to the user 102.
[0020] In some embodiments, the virtual environment 120 is a VR / AR environment. As shown in FIG1, the electronic device 110 of user 102 can be a head-mounted VR / AR device. When user 102 wears the electronic device 110, the virtual environment 120 can be displayed to user 102. This virtual environment can include representations of multiple virtual objects and real objects in the real world. The virtual objects can include virtual representations of real objects in the real world and / or objects that are only applicable to the virtual environment.
[0021] Additionally, user 102 can interact with the virtual environment 120, for example, by manipulating a joystick. In some embodiments, user 102 can control specific objects, such as virtual characters, in the virtual environment 120 by manipulating a physical joystick 140 as shown in FIG. 1.
[0022] In some embodiments, the electronic device 110 may also provide a virtual joystick to the user 102, who may control the virtual joystick through other input devices or gestures, thereby enabling interaction with the virtual environment 120.
[0023] It should be understood that both physical and virtual joysticks can generate an offset relative to their initial position, thereby achieving the corresponding control function. For example, a user can control the joystick to shift to the right, causing the virtual character in the virtual environment 120 to turn to the right.
[0024] In some embodiments, the joystick may have a preset offset range in a preset direction. For example, its minimum offset may be 0, and its maximum offset may be set according to user interaction habits or depend on the mechanical characteristics of the physical joystick.
[0025] Electronic device 110 can implement interactive processes in virtual environment 120 based on input received from user 102 via input device. For example, virtual objects presented in virtual environment 120 can perform predetermined actions based on the received input, such as turning and / or displacement.
[0026] In some embodiments, the virtual environment is an AR / VR environment. Within this specific virtual environment, the electronic device 110 can be any type of AR / VR device, including but not limited to mobile terminals, fixed terminals, or portable terminals, such as mobile phones, desktop computers, laptop computers, netbook computers, tablet computers, media computers, multimedia tablets, gaming devices, wearable devices, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device 110 can also support any type of user-facing interface (such as "wearable" circuitry).
[0027] As shown in Figure 1, environment 100 may optionally include remote device 130, and electronic device 110 may communicate with remote device 130. In some embodiments, remote device 130 may be a cloud server.
[0028] It should be understood that remote device 130 may include at least one of one or more servers, cloud computing platforms, and virtualization centers. It should also be understood that in some embodiments, remote device 130 serves as a background service supporting virtual environment applications. In some embodiments, specific processes may be implemented collaboratively by remote device 130 and electronic device 110. For example, in some embodiments, remote device 130 performs the primary computational task, and electronic device 110 performs the secondary computational task. Alternatively, in other embodiments, remote device 130 performs the secondary computational task, and electronic device 110 performs the primary computational task. Alternatively, in some embodiments, specific processes may be implemented independently by remote device 130 or electronic device 110.
[0029] In short, although in some embodiments some operations are described as being implemented by electronic device 110, these operations can be implemented at least partially by remote device 130. Correspondingly, although some operations are described as being implemented by remote device 130, these operations can be implemented at least partially by electronic device 110. For the sake of brevity only, the same or similar descriptions will be omitted.
[0030] It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.
[0031] The following description will continue with reference to the accompanying drawings, which will provide some exemplary embodiments of this disclosure. Figures 2 to 4Schematic diagrams illustrating interaction in a virtual scene according to some embodiments of the present disclosure are shown. For ease of discussion, the following description uses the virtual environment 120 shown in FIG1 as an example. As an example, in conjunction with Figures 2 to 4 The described process can be performed by the electronic device 110 in FIG1. However, this is merely exemplary and does not limit the embodiments of this disclosure in any way.
[0032] For example, user 102 can control virtual input objects in virtual environment 120 by operating physical devices in the real world (such as joystick 140 in Figure 1).
[0033] like Figure 2 As shown, the joystick 210 in the virtual environment 120 can be controlled in this manner. Once the joystick 210 is offset from the starting position 201 to the position 201-1 in the predetermined direction D, the electronic device 110 determines the offset 202 generated by the joystick 210 in the predetermined direction D from its starting position 201.
[0034] If the electronic device 110 detects that the offset 302 exceeds the first threshold 203 in the predetermined direction D, it controls the virtual object (not shown) in the virtual environment 120 to perform a first action corresponding to the predetermined direction D. For example, the electronic device 110 can change the orientation of the virtual object in the virtual environment 120 according to the preset direction D, that is, make the virtual object perform a corresponding turning action.
[0035] After the joystick 210 generates an offset 202, the offset of the joystick 210 in the predetermined direction D can change, for example, from position 201-1 to position 201-2, that is, the offset decreases. (Continue referring to...) Figure 2 The electronic device 110 can determine that the offset 205 of the joystick 210 in the predetermined direction D, starting from its starting position 201, decreases to less than the second threshold 204.
[0036] In some embodiments, the second threshold 204 may be determined based on a maximum offset of the joystick 210 in a predetermined direction D that exceeds the first threshold 203. In some embodiments, the second threshold 204 may be positively correlated with the maximum offset, for example, proportional to the maximum offset.
[0037] For example, assuming that the offset 202 of the joystick 210 in the predetermined direction D exceeding the first threshold 203 is the maximum offset, a second threshold can be determined based on this offset 202. For example, the second threshold 204 can be half of the offset 202.
[0038] After the electronic device 110 determines that the offset 205 of the joystick 210 in the predetermined direction D has decreased to less than the second threshold 204, the electronic device 110 can determine the change state of the offset of the joystick 210 in the preset direction D. If the electronic device 110 detects that the offset of the joystick 210 in the predetermined direction D has increased from position 210-3, that is, the joystick 210 has increased again from the currently reduced offset 205, the electronic device 110 controls the virtual object in the virtual environment 120 to perform the second action corresponding to the preset direction D.
[0039] like Figure 3 As shown, if the electronic device 110 detects that the joystick 210 has moved from position 210-3 to position 210-4, that is, from the offset 205 to the offset 206 in the predetermined direction D, the electronic device 110 can control the virtual object in the virtual environment 120 to perform a second action corresponding to the predetermined direction D.
[0040] For example, the electronic device 110 can change the orientation of the virtual object in the virtual environment 120 according to the preset direction D, that is, make the virtual object perform the corresponding secondary turning action.
[0041] It should be understood that, Figure 3 The offsets shown are for illustrative purposes only and are not intended to limit the scope of this scheme. For example, the further increased offset could also be less than the second threshold 204. As long as it is determined that the offset continues to increase after decreasing to less than the second threshold, the virtual object in the virtual environment 120 is controlled to perform a second action corresponding to the preset direction D.
[0042] Therefore, once the joystick's offset exceeds the first threshold and decreases to less than the second threshold, the virtual object's movement can be controlled without the joystick's offset exceeding the first threshold again, providing users with a more responsive operating experience.
[0043] In some embodiments, the electronic device 110 may determine a third threshold based on the joystick 210 increasing again from a reduced offset 205 to have an offset in a predetermined direction D. For example... Figure 3 As shown, the third threshold 208 can be determined by increasing the joystick 210 from the offset 205 to an offset 206 in the predetermined direction D.
[0044] In some embodiments, if the electronic device 110 can determine that the offset of the joystick 210 in the preset direction D (not shown) has decreased to less than a third threshold 208, and if the electronic device 110 detects that the offset of the joystick 210 in the preset direction has increased from decreasing to less than the third threshold, then the electronic device 110 can control the virtual object to perform a third action corresponding to the preset direction D.
[0045] For example, the electronic device 110 can change the orientation of the virtual object in the virtual environment 120 according to the preset direction D, that is, make the virtual object perform the corresponding three turning actions.
[0046] Furthermore, the first threshold and the second threshold can be dynamically updated during the operation of the joystick 210. In some embodiments, the electronic device 110 can detect a change in the offset of the joystick 210 after the offset exceeds the first threshold. If the offset increases, the first threshold can be updated based on the current offset of the joystick 210, and the second threshold can be determined based on the updated first threshold.
[0047] like Figure 4 As shown, the joystick 210 can continue to move to position 201-5, i.e., generating an offset 207 in the predetermined direction D. If the electronic device 110 determines that this offset 207 is greater than the offset 202 previously generated by the joystick 210 in the predetermined direction D from the starting position 201, the first threshold can be updated based on this offset 207. For example, the first threshold 203 corresponding to offset 205 can be updated to the first threshold 203' corresponding to offset 207. Accordingly, the electronic device 110 can determine the second threshold 204' based on the updated first threshold 203'.
[0048] That is, the electronic device 110 can update the threshold based on the real-time offset when the offset exceeds the threshold and continues to increase. Conversely, when the offset is decreasing and not less than the threshold, the electronic device 110 may not update the threshold. Furthermore, when the offset decreases to the threshold and then increases again, the electronic device 110 can update the threshold again based on the real-time offset. In this way, the embodiments of this disclosure can dynamically update the threshold used to trigger corresponding actions based on the interaction with the joystick, thereby improving the flexibility of joystick operation.
[0049] Furthermore, based on this method, the electronic device 110 can make the threshold associated with the maximum value reached by the offset, that is, the maximum offset.
[0050] The solution disclosed herein avoids control drawbacks such as sluggish operation and / or inaccurate triggering of movement of the controlled object caused by a fixed joystick threshold setting. The solution disclosed herein dynamically adjusts the joystick threshold setting, providing users with a more accurate and flexible operating experience when manipulating the joystick.
[0051] Figure 5 A flowchart of a method 500 for interacting in a virtual environment according to some embodiments of the present disclosure is shown. Method 500 may be performed by the electronic device 110 shown in FIG1. For ease of discussion, the following description uses electronic device 110 as an example. However, this is merely exemplary and does not impose any limitation on the embodiments of the present disclosure. It should be understood that embodiments of the present disclosure may also be performed by other suitable servers or electronic devices.
[0052] like Figure 5 As shown, in box 510, the electronic device 110 determines the offset of the joystick in a preset direction.
[0053] In box 520, in response to the offset exceeding a first threshold, electronic device 110 controls the virtual object to perform a first action corresponding to a preset direction.
[0054] In box 530, electronic device 110 determines that the offset of the joystick in a preset direction has decreased to less than a second threshold, which is different from the first threshold.
[0055] In box 540, in response to detecting an increase in the offset of the joystick in a preset direction, the electronic device 110 controls the virtual object to perform a second action corresponding to the preset direction.
[0056] In some embodiments, the electronic device 110, in response to the offset exceeding a first threshold, determines a first maximum offset of the joystick in a preset direction and, based on the first maximum offset, determines a second threshold.
[0057] In some embodiments, the second threshold is positively correlated with the first maximum offset.
[0058] In some embodiments, the electronic device 110 determines a change in the offset state in response to the offset exceeding a first threshold; updates the first threshold based on the real-time offset of the joystick in response to the change in the state indicating an increase in the offset; and determines a second threshold based on the updated first threshold.
[0059] In some embodiments, controlling the virtual object to perform a second action corresponding to a preset direction further includes: after the joystick's offset in the preset direction decreases to less than a second threshold, determining the change state of the joystick's offset in the preset direction; and in response to the change state indicating that the offset starts to increase from the target offset, controlling the virtual object to perform a second action corresponding to the preset direction.
[0060] In some embodiments, the electronic device 110 determines a third threshold based on a second maximum offset reached after the offset increases from a target offset; determines that the offset of the joystick in a preset direction decreases to less than the third threshold; and controls a virtual object to perform a third action corresponding to the preset direction in response to detecting an increase in the offset of the joystick in the preset direction.
[0061] In some embodiments, the joystick includes a physical joystick or a virtual joystick.
[0062] In some embodiments, controlling a virtual object to perform a first action corresponding to a preset direction includes: changing the orientation of the virtual object in a virtual scene, wherein the direction of the orientation change is determined based on a preset direction.
[0063] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.
[0064] Embodiments of this disclosure also provide corresponding apparatus for implementing the above methods or processes. Figure 6 A block diagram of an apparatus 600 for interacting in a virtual scene according to some embodiments of the present disclosure is shown.
[0065] like Figure 6 As shown, the device 600 includes a first determining module 610 configured to determine the offset of a joystick in a preset direction; a first control module 620 configured to control a virtual object to perform a first action corresponding to the preset direction in response to the offset exceeding a first threshold; a second determining module 630 configured to determine that the offset of the joystick in the preset direction decreases to less than a second threshold, the second threshold being different from the first threshold; and a second control module 640 configured to control the virtual object to perform a second action corresponding to the preset direction in response to detecting an increase in the offset of the joystick in the preset direction.
[0066] In some embodiments, the device 600 is further configured to: determine a first maximum offset of the joystick in a preset direction in response to the offset exceeding the first threshold; and determine the second threshold based on the first maximum offset.
[0067] In some embodiments, the second threshold is positively correlated with the first maximum offset.
[0068] In some embodiments, the device 600 is further configured to: determine a change state of the offset in response to the offset exceeding the first threshold; update the first threshold based on the real-time offset of the joystick in response to the change state indicating an increase in the offset; and determine a second threshold based on the updated first threshold.
[0069] In some embodiments, the second control module 640 is further configured to: determine a change state of the offset of the joystick in the preset direction after the offset of the joystick in the preset direction decreases to less than the second threshold; and control the virtual object to perform the second action corresponding to the preset direction in response to the change state indicating that the offset starts to increase from the target offset.
[0070] In some embodiments, the device 600 is further configured to: determine a third threshold, the third threshold being determined based on a second maximum offset reached after the offset increases from the target offset; determine that the offset of the joystick in the preset direction decreases to less than the third threshold; and, in response to detecting an increase in the offset of the joystick in the preset direction, control a virtual object to perform a third action corresponding to the preset direction.
[0071] In some embodiments, the joystick may include a physical joystick or a virtual joystick.
[0072] In some embodiments, the first control module 620 is further configured to: change the orientation of the virtual object in the virtual scene, wherein the direction of the orientation change is determined based on the preset direction.
[0073] The modules included in device 600 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the modules in device 600 can be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.
[0074] Figure 7A block diagram is shown in which an electronic device / server 700 in which one or more embodiments of the present disclosure may be implemented. The electronic device 110 of FIG1, for example, can be implemented via... Figure 7 The illustrated electronic device / server 700 is used to implement this. It should be understood that... Figure 7 The electronic device / server 700 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein.
[0075] like Figure 7 As shown, the electronic device / server 700 is in the form of a general-purpose electronic device. Components of the electronic device / server 700 may include, but are not limited to, one or more processors or processing units 710, memory 720, storage devices 730, one or more communication units 740, one or more input devices 750, and one or more output devices 760. The processing unit 710 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 720. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device / server 700.
[0076] Electronic device / server 700 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device / server 700, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 720 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 730 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within electronic device / server 700.
[0077] The electronic device / server 700 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 7 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 720 may include computer program product 725 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0078] The communication unit 740 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device / server 700 can be implemented as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device / server 700 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0079] Input device 750 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 760 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device / server 700 can also communicate with one or more external devices (not shown) via communication unit 740 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device / server 700, or with any device (e.g., network card, modem, etc.) that enables electronic device / server 700 to communicate with one or more other electronic devices. Such communication can be performed via input / output (I / O) interface (not shown).
[0080] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores one or more computer instructions, wherein one or more computer instructions are executed by a processor to implement the methods described above.
[0081] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0082] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0083] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0084] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0085] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for interaction, comprising: Determine the amount of joystick offset in the preset direction; In response to the offset exceeding a first threshold, the virtual object is controlled to perform a first action corresponding to the preset direction; A second threshold is determined based on the first maximum offset of the joystick in the preset direction; Determine that the offset of the joystick in the preset direction is reduced to less than the second threshold, where the second threshold is different from the first threshold; as well as In response to detecting that the offset of the joystick in the preset direction decreases to less than the second threshold and then increases, the virtual object is controlled to perform a second action corresponding to the preset direction.
2. The method of claim 1, wherein the second threshold is positively correlated with the first maximum offset.
3. The method according to claim 1, further comprising: In response to the offset exceeding the first threshold, the change state of the offset is determined; In response to the change in state indicating an increase in the offset, the first threshold is updated based on the real-time offset of the joystick; and The second threshold is determined based on the updated first threshold.
4. The method according to claim 1, wherein controlling the virtual object to perform a second action corresponding to the preset direction further includes: After the offset of the joystick in the preset direction decreases to less than the second threshold, the change state of the offset of the joystick in the preset direction is determined; as well as In response to the change in state indicating that the offset starts to increase from the target offset, the virtual object is controlled to perform the second action corresponding to the preset direction.
5. The method according to claim 4, further comprising: A third threshold is determined based on the second maximum offset reached after the offset starts increasing from the target offset; Determine that the offset of the joystick in the preset direction is reduced to less than the third threshold; as well as In response to detecting an increase in the offset of the joystick in the preset direction, the virtual object is controlled to perform a third action corresponding to the preset direction.
6. The method of claim 1, wherein the joystick comprises: Physical joystick or virtual joystick.
7. The method according to claim 1, wherein controlling the virtual object to perform a first action corresponding to the preset direction includes: The orientation of the virtual object in the virtual scene is changed, wherein the direction of the orientation change is determined based on the preset direction.
8. A device for interaction, comprising: The first determining module is configured to determine the offset of the joystick in a preset direction; The first control module is configured to control the virtual object to perform a first action corresponding to the preset direction in response to the offset exceeding a first threshold. The second determining module is configured to determine a second threshold based on a first maximum offset of the joystick in the preset direction; And determine that the offset of the joystick in the preset direction is reduced to less than the second threshold, the second threshold being different from the first threshold; as well as The second control module is configured to increase the virtual object in response to detecting that the offset of the joystick in the preset direction has decreased to less than the second threshold and then increases the offset.
9. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the device to perform the method according to any one of claims 1 to 7 when executed by the at least one processing unit.
10. A computer-readable storage medium having a computer program stored thereon, the program, when executed by a processor, implementing the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual rocker touch control method and device with function area control and electronic equipment
CN115721923A