A Unity-based object collision avoidance method and terminal

A technology for avoiding collisions and objects, applied in the field of Unity, can solve problems such as pause, poor code reusability, and low efficiency, and achieve the effects of avoiding collisions, improving reusability, and improving efficiency

Active Publication Date: 2019-06-25
FUJIAN TQ DIGITAL
View PDF5 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In Unity, when an object collides with other objects during the movement, there will be problems such as pausing and not following the main control, resulting in poor user experience, and may also overlap with other objects during the movement, resulting in cross-cutting. The current solution The method is to use the automatic climbing method of the object to avoid collision with other objects during the moving process of the object, but there are still some prob

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A Unity-based object collision avoidance method and terminal
  • A Unity-based object collision avoidance method and terminal
  • A Unity-based object collision avoidance method and terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0085] Please refer to figure 1 and Figure 3-10 , a method for avoiding collisions of objects based on Unity, including steps:

[0086] Define the data storage class RaycastHitObject, which is used to store the information of the object to be climbed during the moving process of the object to be moved;

[0087] Encapsulate the SRPositionComponent component, the List in the SRPositionComponent component The collection is used to store the collision object that collides with the object to be moved. One collision object is a RaycastHit, and the movement offset vector of the object to be moved is passed to the SRPositionComponent component, so that the SRPositionComponent component can get that the object to be moved is about to move to the location;

[0088] S1. Calculate the collision box information of the object to be moved according to all effective colliders of the object to be moved, the collision box information includes the center of the collision box and the range ...

Embodiment 2

[0111] Please refer to figure 2 , a terminal 1 for object collision avoidance based on Unity, comprising a memory 2, a processor 3 and a computer program stored on the memory 2 and operable on the processor 3, the processor 3 executing the computer program Each step in the first embodiment is realized at the same time.

[0112] To sum up, the method and terminal for object collision avoidance based on Unity provided by the present invention obtain all colliders of the object to be moved, filter the colliders that do not participate in the calculation and the colliders whose attributes are triggers, and obtain All effective colliders of the object to be moved, calculate the collision box information of the object to be moved according to all effective colliders of the object to be moved, the collision box information includes the center of the collision box and the range of the collision box, and determine the collision box information of the object to be moved The proje...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a unity-based object collision avoidance method and terminal. The method comprises steps of calculating collision box information of a to-be-moved object according to all effective colliders of the to-be-moved object; according to the collision box information, the projection center and the projection vector of the to-be-moved object, determining a to-be-climbed object of the to-be-moved object in the moving process; calculating a position vector of a next frame of the to-be-moved object according to the to-be-climbed object and the collision box information so as to move the to-be-moved object. The automatic climbing of the to-be-moved object in the moving process can be realized under the condition that the specific shape and the structural particularity of the to-be-moved object are not concerned, so that collision is avoided, the reusability of codes for realizing automatic climbing when the object moves is improved, and the code editing efficiency is improved.

Description

technical field [0001] The present invention relates to the technical field of Unity, in particular to a method and a terminal for avoiding collisions of objects based on Unity. Background technique [0002] In Unity, when an object collides with other objects during the movement, there will be problems such as pausing and not following the main control, resulting in poor user experience, and may also overlap with other objects during the movement, resulting in cross-cutting. The current solution The method is to use the automatic climbing method of the object to avoid collision with other objects during the moving process of the object, but there are still some problems. [0003] Due to the differences of each object, the automatic climbing method written for a certain object in Unity has particularity, and it is difficult to reuse the automatic climbing method of the object. At this time, if you want to realize the automatic climbing of other objects when moving, you only ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/36
Inventor 刘德建陈宇翔林琛
Owner FUJIAN TQ DIGITAL
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products