EP-4571468-B1 - METHOD FOR PROVIDING INPUT EVENT TO VIRTUAL OBJECT, HOST, AND COMPUTER READABLE STORAGE MEDIUM
Inventors
- PAN, SHENG-YANG
Dates
- Publication Date
- 20260513
- Application Date
- 20240821
Claims (7)
- A method for providing an input event to a virtual object, applied to a host (200), comprising: displaying (S310), by the host (200), a first virtual object (41) in a virtual world (40), wherein the first virtual object (41) comprises a plurality of coordinates (411, 412, 413); obtaining (S320), by the host (200), at least one mapping relationship between control events of an input object (421, 422) and the plurality of coordinates (411, 412, 413) on the first virtual object (41); receiving (S330), by the host (200), a control event from the input object (421, 422); and determining (S340), by the host (200), a first target coordinate, among the plurality of coordinates (411, 412, 413), corresponding to the control event based on the at least one mapping relationship, and providing a first input event to the first virtual object (41) based on the first target coordinate, wherein the first input event corresponds to the control event from the input object (421, 422); wherein the input object (421, 422) comprises a handheld controller (421, 422) having a physical button (421a, 421b) or a joystick (422a), wherein when the handheld controller (421) has a physical button (421a, 421b), the at least one mapping relationship comprises a first mapping relationship between the physical button (421a, 421b) and a first coordinate (411) among the plurality of coordinates (411, 412, 413), and the method comprises: in response to determining that the control event indicates that the physical button (421a, 421b) has been triggered, determining the first coordinate (411) as the first target coordinate, and accordingly providing the first input event to the first virtual object (41), wherein the first input event is a triggering event on the first coordinate (411); and wherein when the handheld controller (422) has of a joystick (422a), the joystick (422a) has a default position on the handheld controller (422), and the at least one mapping relationship comprises a second mapping relationship between the default position of the joystick (422a) and a second coordinate (412) among the plurality of coordinates (411, 412, 413), and the method comprises: in response to determining that the control event indicates that the joystick (422a) has been pushed toward a second direction, determining the second coordinate (412) as the first target coordinate, and accordingly providing the first input event to the first virtual object (41), wherein the first input event is a dragging event originates from the second coordinate (412), and a dragging direction of the dragging event corresponds to the second direction.
- The method according to claim 1, further comprising: in response to determining that the control event indicates that a body of the handheld controller (421) has been moved toward a first direction while the physical button (421a, 421b) is being pressed and held, determining the first coordinate (411) as the first target coordinate, and accordingly providing the first input event to the first virtual object (41), wherein the first input event is a dragging event originates from the first coordinate (411), and a dragging direction of the dragging event corresponds to the first direction.
- The method according to claim 2, further comprising: in response to determining that the dragging event ends at a second target coordinate corresponding to a function, accordingly providing a second input event to the first virtual object (41), wherein the second input event triggers the function.
- The method according to claim 1, further comprising: displaying (S710) a second virtual object (82) in the virtual world (40), wherein the second virtual object (82) provides a management function associated with the first virtual object (41); displaying (S710) an indicator (81) corresponding to the input object (421, 422); in response to determining that the control event is received in a first case where the indicator (81) does not indicate the second virtual object (82), determining (S730) the first target coordinate corresponding to the control event based on the at least one mapping relationship, and providing the first input event to the first virtual object (41) based on the first target coordinate.
- The method according to claim 4, further comprising: in response to determining that the control event is received in a second case where the indicator (81) is indicating the second virtual object (82), performing the management function associated with the first virtual object (41) without providing any input event to the first virtual object (41).
- A host (200), comprising: a non-transitory storage circuit (202), storing a program code; and a processor (204), coupled to the non-transitory storage circuit (202) and accessing the program code to perform a method as set forth in any one of claims 1-5.
- A non-transitory computer readable storage medium, the computer readable storage medium recording an executable computer program, the executable computer program being loaded by a host (200) to perform the method as set forth in any one of claims 1-5.
Description
BACKGROUND 1. Field of the Invention The present disclosure generally relates to a mechanism for providing a reality service, in particular, to a method for providing an input event to a virtual object, a host, and a computer readable storage medium. 2. Description of Related Art In order to enable users to utilize existing applications on virtual reality (VR) or augmented reality (AR) devices, the interfaces of existing 2D applications or other streaming sources (such as PCs or smartphones) are provided in a form of a 2D panel (e.g., 2D window) within the virtual environment (e.g., the VR world). However, the associated operations are not as intuitively convenient as the original usage on mobile devices or PCs. See FIG. 1, which shows a conventional way of interacting with the 2D window in the virtual environment. In FIG. 1, the user 19 may wear a head-mounted display (HMD) 10 to experience the reality service provided by the HMD 10. In the exemplary scenario of FIG. 1, the HMD 10 may be assumed to provide VR service. In this case, the HMD 10 may render the corresponding virtual world 11 (e.g., the VR world) for the user 19 to see. In the case where the HMD 10 is connected with other electronic devices (e.g., a computer and/or smart devices), the HMD 10 may display a 2D window 12 in the virtual world 11, wherein the 2D window 12 may be mirroring the screen of the considered electronic device. In FIG. 1, it is assumed that the 2D window 12 shows an application (e.g., an android game application) currently run on the electronic device, wherein the application may be designed with some control areas 12a (e.g., a virtual joystick) and/or 12b (e.g., a virtual button), and the user 19 may use the handheld controllers 13a and 13b (e.g., VR controllers) to interact with the application via the virtual world 11. Specifically, the HMD 10 may display raycasts 14a and 14b respectively corresponding to the handheld controllers 13a and 13b, and the user 19 may use the raycasts 14a and 14b to interact with the application. For example, if the user 19 intends to trigger the control area 12b, the user 19 may use the raycast 14b to aim at the control area 12b via moving the handheld controller 13b, and the user 19 may press, for example, a physical button on the handheld controller 13b. In this case, the HMD 10 may determine the position indicated/pointed by the raycast 14b in the virtual world 11 and accordingly determine the corresponding 2D coordinate to the application based on, for example, the dimension/resolution associated with the 2D window 12. Afterwards, the HMD 10 may determine that an input event has occurred on the determined 2D coordinate, and the HMD 10 may provide this input event to the application for the application to react in response to the input of the user 19. Likewise, the user 19 may control the control area 12a by using the raycast 12a to do, for example, some dragging operations, and the associated input events would also be provided to the application for the application to react. In some cases, the application may also be run on the HMD 10 itself, and the HMD 10 can still show the same content as in FIG. 1, such that the user 19 can interact with the application in the way discussed in the above. However, the user 19 needs to perform lots of aiming in the scenario of FIG. 1, the user 19 may feel tired and inconvenient when interacting with the virtual world 11. US 2023/384907 A1 discloses a computer system which facilitates manipulation of a three-dimensional environment relative to a viewpoint of a user of the computer system. In some embodiments, a computer system facilitates manipulation of virtual objects in a virtual environment. In some embodiments, a computer system facilitates manipulation of a three-dimensional environment relative to a reference point determined based on attention of a user of the computer system. More specifically, US 2023/384907 A1 discloses a method, comprising: at a computer system in communication with a display generation component and one or more input devices: displaying, via the display generation component, an environment from a first viewpoint of a user of the computer system, the environment including a first object at a first location and a second object at a second location, different from the first location; while displaying the environment including the first object and the second object, detecting, via the one or more input devices, a first interaction input, including movement; and in response to detecting the first interaction input: in accordance with a determination that attention of the user of the computer system is directed to the first object when the first interaction input is detected: performing a first operation involving manipulating the environment relative to a first reference point that is based on the first location of the first object in the environment in accordance with the movement; and in accordance with a determination that the