Version: Unity 2019.2.11f1 (64-bit)
I am creating a street 2 fighter style 2D fighting game with Unity3d.
In the process of the enemy, in the process of facing the opponent's direction, with update
// Always face the player
Vector3 pos = new Vector3 (player.transform.position.x, transform.position.y, player.transform.position.z); transform.LookAt (pos);
The player's game object is set in player.
However, with this, if the opponent and the player overlap
It will be buzzing as if you were separated.
There is a way to prevent this from being a ghost
I couldn't think of it.
Is there any good way?
Answer # 1
In the first place, I don't think there are many situations where characters overlap with each other.
Basically, unless the technique is being activated, I think that it will be pushed against each other by the push judgment, but how about it?
Answer # 2
I don't understand a little detail, but I think the problem is that the hit judgment or physics calculation occurs when the opponents overlap.
Why not set layers so they don't interfere with each other?
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory