开发者

Collision between two character controller

开发者 https://www.devze.com 2023-04-08 04:43 出处:网络
Hello eve开发者_运维问答ryone I am new in unity. I create two character on my project. They can move easily. But the problem is I cannot make collision between them. Please help me. Give me some code.

Hello eve开发者_运维问答ryone I am new in unity. I create two character on my project. They can move easily. But the problem is I cannot make collision between them. Please help me. Give me some code.....


First, do you want to 'make' ridigbodies collide or detect the collision?

Assuming the latter because that is mostly the objective, collision detection is a very wide topic, and it is difficult to give an exact answer without knowing what exactly is the problem you are facing, and since you are learning, i am giving some links which should be helpful in understanding and implementing collision detection in Unity3d.

What you need to study in order to do collision detection is Raycasting. Second, about your specific problem (colliding character controllers) no code can be give since you didn't give any details about your game environment and what have you created, but this should be helpful (study the heading Character Controllers), but do study the basic of collisions and collision detection in detail.

and the links:

  • Unity3d documentation: Physics
  • A question about learning collision detection on Unity3d Forums
  • Apparently a good tutorial
  • Raycast script reference

Hope this helps.

In future do mention your specific problem, and what you have done so far, or if you want to start learning, do mention clearly what you want to learn.

0

精彩评论

暂无评论...
验证码 换一张
取 消