Character flashes left and right

Insert image description here
Insert image description here

Through observation, it was found that the Colider of the monster's range check came into contact with the Colider of Long Platform, which caused the targetPoint to continuously switch between PointA and Long Platform, and ultimately the monster continued to flicker.

We can set the Colider Mask of the Long Platform, and set the Long Platform to have a collision relationship with the collision body of the game object whose layer is Player, Environment, and Bomb. As shown below.
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_39520967/article/details/107802105