I am working on a basic project with Unity 3D and I have added basic functions that my first person character can be able to do in the game. One of them is attacking enemy and the other one is collecting coins. In order to collect coins I adjust the settings of Capsule Collider of FPSCotroller with the radius of 1.2 and turning Is Trigger to on. So I was be able to collect coins but the problems comes from when I added the ability of attacking enemy. In order to do that I MUST change the radius of the Capsule Collider to 0! Like this image:
Whenever the radius is set to 0 ,he can't collect coins anymore and if I change it back to 1.2 ,he can't attack the enemy (enemy is rat in the pic).
So basically my character has to do one of the functions. If he wants to attack I have to set the radius to 0 and if he wants to collect coins I have to set the radius to 1.2 in Capsule Collider...
How to adjust some settings that the character can do both. What is the correct number for setting as radius of Capsule Collider ? Any idea ?
(I have successfuly scripted the codes & ... for both functions - no need to include those here)
Aucun commentaire:
Enregistrer un commentaire