How to enemy AI look at me faster?
Asked Answered
C

2

0

I implemented AI looking but it is slow (slowly rotates towards the player)

LookAt(newVelocity, Vector3.Up, true);

I tried to use LookingAt Method for giving weight. But it didn't work properly.

GlobalTransform.LookingAt(newVelocity, Vector3.Up);
Transform.InterpolateWith(GlobalTransform, .5f);

Does anyone know how I can do this?

Crouse answered 7/11, 2023 at 20:0 Comment(0)
D
1

If I remember right LookAt rotates the node instantly, what are you putting in the newVelocity variable?

Doddered answered 7/11, 2023 at 21:57 Comment(0)
C
0

Doddered I apologize for opening the discussion, the problem was elsewhere in the code. The LookAt function quickly rotates the node.

Crouse answered 7/11, 2023 at 22:15 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.