Home > other >  What is the physics principle of unity3d?
What is the physics principle of unity3d?

Time:09-20

Well, I don't mean the ordinary physical collision,
I know common physics is based on the coordinate and to determine whether the collision volume,
But there's a problem ah,
For example:
Fired a single shot
Hundreds of entities within the same scene,
Does every frame to make a judgment on the bullet entities and other entities?
But also may be more than one shot, can be a lot of hair,
I feel a thread running would be out of the question,

Principle,

CodePudding user response:

That's the theory, but the cycle of internal unity is not as simple as doing collision detection, internal will have mapped to multiple objects such as barrels, only the objects in the same bucket to collision, etc.,

CodePudding user response:

OnColliderEnter method is not specifically for collision detection, judgment, you want to test the tag value of the object and then operate

CodePudding user response:

But, still not fully explain completely...
@ # 1: seems a little understand, how can I calculate a cask? According to the coordinates of differentiation? Some of the objects are in high speed motion, from a bucket to the other, the performance of a bucket is also need to consume or don't understand, please guide,
@ # 2: not to do, but suddenly want to get the principle of unity3d, also be waxed and insights,
@ # 3: the current server that haven't learned... But principle seems to be like that,

CodePudding user response:

This is very simple,,, could be divided into two bullets with scene,,, it is ok to

CodePudding user response:

This should involve the space division algorithm, such as the octree,

CodePudding user response:

Solution: trace collision function source code to see, the original code thoroughly understand, you can realize your problem,
You ask me, I won't, I'm a little white

CodePudding user response:

The problem is deep,

CodePudding user response:

Scene in the static object in the engine in the form of a binary tree storage test when first rays of the binary tree aabb collision detection is used to eliminate body has nothing to do most of the data and finally to determine the specific impact to detect which mesh mesh before rays to specific surface are generally octree collision dynamic objects stored detection speed will slow down a little but add and remove objects will be fast

CodePudding user response:

Games determine whether been shot should be to judge the other side of the server, a client frequent physical detection, game performance is not too high

CodePudding user response:

Issue is deep and the Unity inside has finished processing, as long as the processing logic judgment
  • Related