Multi-platform interaction method, device and electronic device
By determining the interaction mode in the interactive device and performing ray casting, the multi-platform interaction problem caused by the difference between three-dimensional and two-dimensional interactive devices is solved, and the effects of cost reduction and interaction simplification are achieved.
Patent Information
- Application Number
- CN202010701938.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-20
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-07-20
AI Technical Summary
The differences between existing three-dimensional interactive devices and two-dimensional interactive devices result in the same game program being unable to satisfy multi-platform interaction at the same time, increasing the cost and complexity of game program development.
By determining the interaction mode of the target interactive device, monitoring input events and performing ray casting, associating ray events to interactive controls so that they can respond to ray events, an intermediate mapping layer between three-dimensional and two-dimensional interactions is achieved, which is suitable for any input device.
It realizes three-dimensional and two-dimensional multi-platform interaction, reduces game development costs, simplifies the UI design process, and saves ray-related performance.
Smart Images

Figure CN111803930B
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a multi-platform interaction method, device and electronic device. Background Art
[0002] With the continuous development of the gaming industry, there are more and more types of gaming devices available to players, including TV game consoles, handheld game consoles, personal computers (PCs), virtual reality (VR) devices, etc. The hardware differences between different types of gaming devices are also quite large. For example, the hardware of PC devices includes monitors, consoles, keyboards, mice, etc., while the hardware of VR devices includes VR headsets, etc.
[0003] At present, due to the many differences in the interactions between three-dimensional interactive devices (such as VR devices) and two-dimensional interactive devices (such as PCs), the same game program cannot simultaneously meet the requirements of three-dimensional and two-dimensional multi-platform interactions, which makes the development cost of the game program relatively high. Summary of the invention
[0004] The purpose of the present invention is to provide a multi-platform interaction method, device and electronic device to alleviate the technical problem that the same game program cannot simultaneously meet three-dimensional and two-dimensional multi-platform interactions, thereby increasing the cost of game program development.
[0005] In a first aspect, an embodiment of the present application provides a multi-platform interaction method, which is applied to an interaction system, wherein the interaction system is used for interaction between a target interaction device and a game, wherein the target interaction device is a three-dimensional interaction device or a two-dimensional interaction device, and the game includes an interaction control; the method includes:
[0006] Determining a target interaction mode corresponding to the target interaction device;
[0007] In the target interaction mode, monitoring input events of the target interaction device, and performing ray casting for the monitored target input events;
[0008] Determine a target interactive control to which the ray is projected, and a ray event triggered for the target interactive control;
[0009] The ray event is associated with the target interactive control so that the target interactive control responds to the ray event.
[0010] In a possible implementation, the step of determining the target interaction mode corresponding to the target interaction device includes:
[0011] Determining a target type of the target interactive device;
[0012] Based on the predetermined correspondence between the type and the interaction mode, a key table and ray initial data in the target interaction mode corresponding to the target type are determined.
[0013] In a possible implementation, the ray initial data includes:
[0014] The ray's identifier, ray type, ray specification, ray configuration parameters, and bound input event collection.
[0015] In a possible implementation, the ray types include a camera ray pointer, a space ray pointer, and an abstract ray pointer of a collision box for interaction.
[0016] In a possible implementation, each of the collision box abstract ray pointers for interaction is bound to an input axis; and the step of determining the target interactive control to which the ray is projected includes:
[0017] Based on the input axis bound to the collision box abstract ray pointer for interaction, collision detection is performed on the projected ray pointer of the target input event, and the target collision box abstract ray pointer that the projected ray pointer collides with is determined by filtering, and the target collision box abstract ray pointer corresponds to the target interactive control.
[0018] In a possible implementation, the ray event triggered for the target interactive control includes movement logic and / or drag logic of the projected ray pointer.
[0019] In a possible implementation, the step of associating the ray event with the target interactive control includes:
[0020] Determining an operation instruction for the target interactive control based on the movement logic and / or drag logic of the projected ray pointer;
[0021] An operation instruction for the target interactive control is associated with the target interactive control.
[0022] In a possible implementation, the operation instruction includes:
[0023] One or more of Press, Release, Enter, Leave, Select, and Cancel.
[0024] In a possible implementation, when the target interaction device is a three-dimensional interaction device, there are multiple target interaction devices.
[0025] In a second aspect, a multi-platform interaction device is provided, which is applied to an interaction system, wherein the interaction system is used for interaction between a target interaction device and a game, wherein the target interaction device is a three-dimensional interaction device or a two-dimensional interaction device, and the game includes an interaction control; the device includes:
[0026] A first determining module, used to determine a target interaction mode corresponding to the target interaction device;
[0027] A projection module, used for monitoring input events of the target interactive device in the target interactive mode, and performing ray projection for the monitored target input events;
[0028] A second determination module is used to determine a target interactive control to which the ray is projected, and a ray event triggered for the target interactive control;
[0029] An associating module is used to associate the ray event with the target interactive control so that the target interactive control responds to the ray event.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0031] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to execute the method described in the first aspect above.
[0032] The embodiments of the present application bring the following beneficial effects:
[0033] A multi-platform interaction method, device and electronic device provided in an embodiment of the present application can determine a target interaction mode corresponding to a target interaction device, so that input events of the target interaction device can be monitored in the target interaction mode, and ray projection can be performed on the monitored target input events to determine the target interaction control to which the ray is projected and the ray event triggered for the target interaction control, so that the ray event can be associated with the target interaction control so that the target interaction control responds to the ray event. In this scheme, by monitoring and determining the ray event in the target interaction mode corresponding to the target interaction device, the target interaction control responds to the ray event, and the ray can detect the current UI by physical detection, thereby realizing the rayization of the collision box, which is equivalent to an intermediate mapping layer between three-dimensional and two-dimensional interactive inputs, can satisfy both three-dimensional scenes and two-dimensional scenes, and can be applicable to any input devices in two-dimensional and three-dimensional, thereby realizing three-dimensional and two-dimensional multi-platform interaction.
[0034] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 A flowchart of a multi-platform interaction method provided in an embodiment of the present application;
[0037] Figure 2 Another schematic diagram of a multi-platform interaction method provided in an embodiment of the present application;
[0038] Figure 3 An example diagram of a system framework in a multi-platform interaction method provided in an embodiment of the present application is shown;
[0039] Figure 4 A schematic diagram of the structure of a multi-platform interaction device provided in an embodiment of the present application;
[0040] Figure 5 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0042] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0043] At present, VR technology is increasingly being used, and various problems are coming up that need to be solved. Among them, there are many differences in the interaction between VR devices and desktop personal computers (PCs), making it difficult for developers to develop the same content on two completely different platforms at the same time.
[0044] Since there are many differences between the two, the differences between PC and VR systems are mainly explained below through three aspects: virtual camera, input device, and user interface (UI).
[0045] Regarding the control over the virtual camera: the virtual camera of PC is mainly mapped through the screen, so in theory the screen is still, and the player mainly controls the rotation of the virtual camera in the screen by using the keyboard, mouse or handle; the virtual camera of VR is mapped on the screen of the helmet, so in reality the helmet is always moving, because the user's head movement is unpredictable. In other words, the program has no control over the virtual camera in the game.
[0046] Regarding the difference in input devices: PC devices are mainly keyboards, keyboards and mice, or handles. In most UI interactions, the input of keyboards and mice or handles is mapped to the two-dimensional space of the screen, so there is no need to consider dimensions such as depth and three-dimensional rotation in PC interactions. The common VR input device is a two-hand controller. Usually there are two input devices. This is one of the biggest differences from the PC. It can be understood as a PC having two mice for input.
[0047] Differences in UI usage: Most UIs on PC devices cover the entire screen, and usually other interactive inputs are blocked when the UI is turned on; when performing UI interaction in VR, other interactions are not blocked most of the time. At the same time, because there are two controllers, there are two rays interacting with the UI at the same time. Moreover, the UI in VR is in three-dimensional space, so it is difficult to confirm which UI the user wants to interact with.
[0048] Currently, the mobile UI framework-raycaster (Canvas-Raycaster) is usually used to receive UI interaction events. Among them, Canvas can also be understood as Canvas canvas, which is a resolution-dependent bitmap canvas. Any graphics can be drawn on Canvas, and even photos can be loaded.
[0049] Since there are many differences between the interactions between three-dimensional interactive devices (such as VR devices) and two-dimensional interactive devices (such as PCs), the same game content cannot simultaneously satisfy three-dimensional and two-dimensional multi-platform interactions, which increases the cost of game development and reduces the convenience of game use.
[0050] Based on this, the embodiments of the present application provide a multi-platform interaction method, device and electronic device, by which the technical problem that the same game program cannot simultaneously meet three-dimensional and two-dimensional multi-platform interactions, thereby increasing the cost of game program development, can be alleviated.
[0051] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0052] Figure 1 A flowchart of a multi-platform interaction method provided by an embodiment of the present application. The method is applied to an interactive system, the interactive system is used for the interaction between a target interactive device and a game, the target interactive device is a three-dimensional interactive device or a two-dimensional interactive device, and the game includes interactive controls. Figure 1 As shown, the method includes:
[0053] Step S110, determining a target interaction mode corresponding to the target interaction device.
[0054] The three-dimensional interactive device in the embodiment of the present application may be a VR, the two-dimensional interactive device may be a PC, and the interactive controls included in the game may be a user interface (UI). The target interactive mode may include a VR mode or a PC mode. The target interactive device may be an interactive device such as a handle, a mouse, or a keyboard.
[0055] This step can be performed during the initialization of the device. During this process, the interactive system introduces the concepts of VR and PC modes, and initializes the corresponding manager and input module (InputModule) by judging the current mode. The corresponding manager refers to the VR mode manager and the PC mode manager. Multiple rays (Pointers) can be managed through an independent manager, so that multiple rays can exist simultaneously in the VR mode.
[0056] In practical applications, the VR device in the embodiment of the present application may be a controller with 6 degrees of freedom (DOF), and both hands also have 6DOF tracking. It should be noted that 3DOF refers to the freedom of 3 rotation angles, while 6DOF refers to the freedom of 3 positions related to up, down, front, back, left and right in addition to the 3 rotation angles. 3DOF VR glasses or VR devices refer to the VR device that can detect the free rotation of the head in different directions, but cannot detect the spatial displacement of the head in the front, back, left and right directions. In addition to detecting the changes in the field of view angle caused by the rotation of the head, 6DOF VR devices or VR glasses can also detect the changes in the up, down, front, back, left and right displacements caused by body movement.
[0057] Step S120: In the target interaction mode, the input events of the target interaction device are monitored, and ray casting is performed for the monitored target input events.
[0058] A ray is an endless line emitted from a point in a 3D scene in one direction. When it collides with other objects in the emission trajectory, it will stop emitting. In games, rays are widely used and can be used for character movement, collision detection, etc., such as detecting whether a bullet hits a target. This step can also be understood as the process of the interactive system projecting rays.
[0059] Step S130, determining the target interactive control to which the ray is projected, and the ray event triggered for the target interactive control.
[0060] The target interactive control is the interactive control to which the ray is projected in the game. This step can also be understood as the process of dispatching the ray by the interactive system. The embodiment of the present application is described by taking the ray processing emission event data in a logical frame as an example.
[0061] Step S140: Associating the ray event with the target interactive control so that the target interactive control responds to the ray event.
[0062] Regarding the reception of ray events, it should be noted that after the ray is projected, an operation instruction can be obtained, for example, a trigger instruction (click instruction), a drag instruction, and the like.
[0063] In the embodiment of the present application, a collider is used to replace the mobile UI frame (Canvas), so that the ray detects the current UI through physical detection, and the collision box is rayed. Among them, the Collider can simulate the effect of collision in the virtual scene. Specifically, the Collider triggers a collision according to the physical engine, produces a collision effect, and can call functions to achieve collision entry, stay, leave, rebound and other similar effects.
[0064] By monitoring and determining the ray event in the target interaction mode corresponding to the target interaction device, the target interaction control responds to the ray event, which can satisfy the situation of multiple interaction rays at the same time, and can also satisfy the situation of 3D space and 2D space at the same time, realizing an intermediate mapping layer between VR and PC interactive input, which can be applied to any input device in two or three dimensions, and realizing multi-platform interaction between VR and PC. Moreover, due to the unified management of rays, ray-related performance can also be saved. Only one set of UI resources needs to be designed, and related controls can be spliced by themselves, which makes the UI design process more convenient.
[0065] The above steps are described in detail below.
[0066] In some embodiments, the interactive device may be a two-dimensional interactive device or a three-dimensional interactive device. As an example, when the target interactive device is a three-dimensional interactive device, there are multiple target interactive devices. For example, the target interactive device may be a left-hand handle, a right-hand handle, VR glasses, and other three-dimensional interactive devices in a VR device.
[0067] In some embodiments, the target interaction mode corresponding to the target interaction device may be determined based on the target type of the target interaction device. As an example, the above step S110 may include the following steps:
[0068] Step a), determining the target type of the target interactive device;
[0069] Step b) determines the key table and ray initial data in the target interaction mode corresponding to the target type based on the predetermined correspondence between the type and the interaction mode.
[0070] For the above step b), the process of determining the key table and the initial ray data can be understood as two initialization processes.
[0071] Among them, the key table corresponds to the initialization of the input module (InputModule) (such as Figure 2 InputModule.Process in the InputModule. InputModule can include devices such as mouse, keyboard, handle and VR input device controllers. It should be noted that the content of InputModule initialization can include two types of initialization. First, initialize VR and PCInput, which is also an important part of the input dispatcher (InputDispatcher). The input part initialization is mainly to create a key table for the corresponding mode (VR mode, PC mode, etc.); second, pass the pre-configured selected object to the interactive event system (InteractEventSystem) to activate the navigation function of the handle.
[0072] The data initialization of the ray corresponds to the initial data of the ray. The data of the ray (such as Figure 2 ProcessPointerData in the InputModule accesses the ray manager (PointerManager), traverses all current ray instances, calls the corresponding initialization data interface, and passes the corresponding data into the initialized data body for event dispatch.
[0073] Based on the above steps a) and b), the ray initial data may include various aspects of ray information. As an example, the ray initial data includes: ray identification, ray type, ray specification, ray configuration parameters, and bound input event set.
[0074] The specifications of the ray may include ray radius (ie, ray thickness), ray maximum ray distance and other ray data.
[0075] In actual applications, the initial data of each ray may include ray type parameters (PointerParams), UI controls (LayerAndTagFilter) for filtering different layers (Layer, the layer of UI form in UI framework) and different tags (Tag) at the same layer, methods for defining the event data of this ray (GetDefaultPointerEventData), specific ray processing methods (ProcessRaycast), and unique identifiers to obtain ray instances (PointerId), etc. For example, the ray identity number (Identity, ID), the ray starting point and direction, the collider of which layer the ray can interact with, the custom tag list for target filtering, the maximum number of cached targets, the custom target sorting method, the custom pointer state getter, the custom ray appearance rendering interface, the input event set bound to the ray, the custom parameters of the ray, and other configuration parameters.
[0076] Based on this, the ray initial data may also include relevant information of the ray pointer. As an example, the ray types include a camera ray pointer, a space ray pointer, and an abstract ray pointer of a collision box for interaction.
[0077] In the embodiment of the present application, rays may be of various types, including screen mouse rays in PC mode, spatial linear rays in PC and VR modes, cylindrical rays, and collider interaction collision boxes.
[0078] It should be noted that the CameraRayPointer is mostly used in PC mode, which emits rays from a point on the screen, perpendicular to the screen and away from the camera. Mouse ray is one of the commonly used implementations.
[0079] In practical applications, the SpaceRayPointer can be used in PC and VR modes. It takes the position of a transform as the starting point and emits rays in the z-axis direction of the transform.
[0080] The ColliderRayPointer abstracts the collision box used for interaction into a type of pointer. In essence, it is the interactive collision between general collision boxes and has nothing to do with rays. This abstraction is to unify all interactive interfaces and mechanisms.
[0081] Based on this, the interactive system can perform collision detection through the input axis to determine the target interactive control to which the ray is projected. As an example, each collision box abstract ray pointer for interaction is bound to an input axis; the process of determining the target interactive control to which the ray is projected in the above step S130 may include the following steps:
[0082] Step c), based on the input axis bound to the collision box abstract ray pointer used for interaction, collision detection is performed on the projected ray pointer of the target input event, and the target collision box abstract ray pointer that the projected ray pointer collides with is determined by filtering, and the target collision box abstract ray pointer corresponds to the target interactive control.
[0083] For step c), the collision box used for interaction can be abstracted into a pointer. This abstraction is to unify all interaction interfaces and mechanisms. The ray casting is driven by the input module (InputModule), and the InputModule is updated by the interaction event system (such as Figure 2 The InteractionEventSystem.Update method in the event handler drives the execution of each frame. The projection result can be filtered by a filter and used for the next event dispatch.
[0084] The PreparePointerData method for ray data initializes each activated pointer event data by calling the PreparePointerData method of each activated pointer object. The ProcessPointerCast method processes the collision detection of each activated pointer and caches the results by calling the ProcessPointerCast method of the specific ray of each activated pointer object.
[0085] For the ray event process (ProcessPointerEvent) method, listen for input events and call the specified command interface for all activated pointer collision detection targets to pass pointer event data. Implemented in the subclass.
[0086] For the ray rendering process (ProcessPointerRenderring) method, the appearance rendering logic of each pointer that needs appearance is processed by calling the ProcessRenderring method of each activated pointer object. PCInputModule inherits the input module of AbstractInputModule in PC mode and relies on the input dispatcher (InputDispatcher). VRInputModule inherits the input module of AbstractInputModule in VR mode and currently partially relies on InputDispatcher.
[0087] In practical applications, ray events (such as Figure 2 The dispatch process of ProcessPointeEvent in can include the input part, that is, each ray is bound to an input axis (Axis), and the input module (InputModule) determines whether the ray is triggered through the input dispatcher (InputDispatcher).
[0088] Based on the above step c), the dispatch of ray events may also include other parts besides input. As an example, the ray event triggered for the target interactive control includes the movement logic and / or drag logic of the projected ray pointer.
[0089] In addition to the input part, the dispatch of ray events also includes processing ray movement logic and processing drag logic. Among them, processing ray movement logic can include logic for determining whether the ray enters and leaves the corresponding control. Processing drag logic can be oriented to controls with drag properties, such as border sliders.
[0090] In the embodiment of the present application, the three parts of input, processing ray movement logic and processing drag logic fill the input and projected related information into the ray data (PointerData), and then distribute it to the filtered control.
[0091] Based on this, the process of associating the ray event with the target interactive control can be implemented through movement logic and drag logic. As an example, the above step S140 may include the following steps:
[0092] Step d), determining an operation instruction for a target interactive control based on the movement logic and / or drag logic of the projected ray pointer;
[0093] Step e) associating the operation instruction for the target interactive control to the target interactive control.
[0094] Receipt of ray events (such as Figure 2ProcessPointerRenderring in the above figure shows that the corresponding events will be dispatched to the controls filtered from the previous part. For each control, you only need to inherit the interaction component template (Interaction ElementInterface) and add a collider to receive the messages sent by the UI interaction framework.
[0095] Based on the above steps d) and e), the operation instructions for the target interactive control may include multiple operation modes. As an example, the operation instructions include: one or more of: press, lift, enter, leave, select and cancel.
[0096] Taking the selectable object (Selectable) as an example, the related interfaces that Selectable can inherit include: the logic when the corresponding axis of the ray is pressed (IPointerDownHandler), the logic when the corresponding axis of the ray is lifted (IPointerUpHandler), the logic when the ray enters the control (IPointerEnterHandler), the logic when the ray leaves the control (IPointerExitHandler), the handle-related selection logic (ISelectHandler), and the handle-related deselection logic (IDeselectHandler).
[0097] Figure 3 The system framework example diagram in the multi-platform interaction method provided by the embodiment of the present application is shown. The framework may include a ray manager (PointerManager), an input module (InputModule), an input dispatcher (InputDispatcher), an interaction component template (InteractionElementInterface) and an interaction event system (InteractEventSystem).
[0098] Figure 4 A schematic diagram of the structure of a multi-platform interactive device is provided. The device can be applied to an interactive system, where the interactive system is used for the interaction between a target interactive device and a game, where the target interactive device is a three-dimensional interactive device or a two-dimensional interactive device, and the game includes interactive controls. Figure 4 As shown, the multi-platform interaction device 400 includes:
[0099] A first determination module 401 is used to determine a target interaction mode corresponding to a target interaction device;
[0100] The projection module 402 is used to monitor input events of the target interactive device in the target interactive mode, and perform ray projection for the monitored target input events;
[0101] A second determination module 403 is used to determine the target interactive control to which the ray is projected, and the ray event triggered for the target interactive control;
[0102] The association module 404 is used to associate the ray event with the target interactive control so that the target interactive control responds to the ray event.
[0103] In some embodiments, the first determining module 401 is specifically configured to:
[0104] Determine the target type of the target interactive device;
[0105] Based on the predetermined correspondence between the type and the interaction mode, the key table and the ray initial data in the target interaction mode corresponding to the target type are determined.
[0106] In some embodiments, the ray initialization data includes:
[0107] The ray's identifier, ray type, ray specification, ray configuration parameters, and bound input event collection.
[0108] In some embodiments, ray types include camera ray pointers, space ray pointers, and collision box abstract ray pointers for interactions.
[0109] In some embodiments, each collision box abstract ray pointer for interaction is bound to an input axis; the second determination module 403 is specifically used to:
[0110] Based on the input axis bound to the collision box abstract ray pointer used for interaction, collision detection is performed on the projected ray pointer of the target input event, and the target collision box abstract ray pointer that the projected ray pointer collides with is determined by filtering. The target collision box abstract ray pointer corresponds to the target interactive control.
[0111] In some embodiments, the ray event triggered for the target interactive control includes movement logic and / or drag logic of the projected ray pointer.
[0112] In some embodiments, the association module 404 is specifically configured to:
[0113] Determine an operation instruction for a target interactive control based on the movement logic and / or drag logic of the projected ray pointer;
[0114] Associate the operation instruction for the target interactive control to the target interactive control.
[0115] In some embodiments, the operating instructions include:
[0116] One or more of Press, Release, Enter, Leave, Select, and Cancel.
[0117] In some embodiments, when the target interaction device is a three-dimensional interaction device, there are multiple target interaction devices.
[0118] The multi-platform interaction device provided in the embodiment of the present application has the same technical features as the multi-platform interaction method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0119] An electronic device provided in an embodiment of the present application is Figure 5 As shown, the electronic device 500 includes a memory 501 and a processor 502. The memory stores a computer program that can be run on the processor. When the processor executes the computer program, the steps of the method provided in the above embodiment are implemented.
[0120] See also Figure 5 The electronic device further includes: a bus 503 and a communication interface 504, a processor 502, a communication interface 504 and a memory 501 are connected via the bus 503; the processor 502 is used to execute an executable module stored in the memory 501, such as a computer program.
[0121] The memory 501 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 504 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0122] The bus 503 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0123] Among them, the memory 501 is used to store programs, and the processor 502 executes the program after receiving the execution instruction. The method executed by the device defined by the process disclosed in any embodiment of the present application can be applied to the processor 502 or implemented by the processor 502.
[0124] The processor 502 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 502. The above processor 502 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 501, and the processor 502 reads the information in the memory 501 and completes the steps of the above method in combination with its hardware.
[0125] Corresponding to the above-mentioned multi-platform interaction method, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned multi-platform interaction method.
[0126] The multi-platform interaction device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application, its implementation principle and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.
[0127] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0128] For another example, the flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0131] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the multi-platform interaction method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.
[0132] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0133] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A multi-platform interaction method, characterized in that: Applied to an interactive system, the interactive system is used for interaction between a target interactive device and a game, the target interactive device is a three-dimensional interactive device or a two-dimensional interactive device, and the game includes an interactive control; the method includes: Determining a target interaction mode corresponding to the target interaction device; In the target interaction mode, monitoring input events of the target interaction device, and performing ray casting for the monitored target input events; Determine a target interactive control to which the ray is projected, and a ray event triggered for the target interactive control; Associating the ray event with the target interactive control so that the target interactive control responds to the ray event; The step of determining the target interaction mode corresponding to the target interaction device includes: determining the target type of the target interaction device; determining the key table and ray initial data in the target interaction mode corresponding to the target type based on the predetermined correspondence between the type and the interaction mode; The initial ray data includes: a ray type, wherein the ray type includes an abstract ray pointer of a collision box for interaction, and each of the abstract ray pointers of the collision box for interaction is bound to an input axis; the step of determining the target interactive control to which the ray is projected includes: performing collision detection on the projected ray pointer of the target input event based on the input axis bound to the abstract ray pointer of the collision box for interaction, and determining the target collision box abstract ray pointer that the projected ray pointer collides with by filtering, wherein the target collision box abstract ray pointer corresponds to the target interactive control.
2. The method according to claim 1, characterized in that The initial ray data includes: The ray's identifier, ray type, ray specification, ray configuration parameters, and bound input event collection.
3. The method according to claim 2, characterized in that The ray types include camera ray pointers, space ray pointers, and collision box abstract ray pointers for interaction.
4. The method according to claim 3, characterized in that The ray event triggered for the target interactive control includes the movement logic and / or drag logic of the projected ray pointer.
5. The method according to claim 4, characterized in that The step of associating the ray event with the target interactive control comprises: Determining an operation instruction for the target interactive control based on the movement logic and / or drag logic of the projected ray pointer; An operation instruction for the target interactive control is associated with the target interactive control.
6. The method according to claim 5, characterized in that The operation instructions include: One or more of Press, Release, Enter, Leave, Select, and Cancel.
7. The method according to claim 1, characterized in that When the target interaction device is a three-dimensional interaction device, there are multiple target interaction devices.
8. A multi-platform interactive device, characterized in that: Applied to an interactive system, the interactive system is used for interaction between a target interactive device and a game, the target interactive device is a three-dimensional interactive device or a two-dimensional interactive device, and the game includes an interactive control; the device includes: A first determining module, used to determine a target interaction mode corresponding to the target interaction device; A projection module, used for monitoring input events of the target interactive device in the target interactive mode, and performing ray projection for the monitored target input events; A second determination module is used to determine a target interactive control to which the ray is projected, and a ray event triggered for the target interactive control; An associating module, used for associating the ray event with the target interactive control so that the target interactive control responds to the ray event; The first determination module is specifically used to: determine the target type of the target interaction device; based on the predetermined correspondence between the type and the interaction mode, determine the key table and ray initial data in the target interaction mode corresponding to the target type; The initial ray data includes: a ray type, wherein the ray type includes an abstract ray pointer of a collision box for interaction, and each of the abstract ray pointers of the collision box for interaction is bound to an input axis; the second determination module is specifically used to: perform collision detection on the projected ray pointer of the target input event based on the input axis bound to the abstract ray pointer of the collision box for interaction, and determine the target collision box abstract ray pointer that the projected ray pointer collides with by filtering, and the target collision box abstract ray pointer corresponds to the target interactive control.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to execute the method according to any one of claims 1 to 7.
