hadie Posted July 9, 2024 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 86 Reputation: 1 Joined: 03/11/12 Last Seen: January 11 Share Posted July 9, 2024 How to make npc move direction when we touch the npc? Like this Before touch normal after touch the direction will follow where you are Quote Link to comment Share on other sites More sharing options...
0 Lily Cumming Posted July 10, 2024 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 1 Reputation: 0 Joined: 07/10/24 Last Seen: July 10, 2024 Share Posted July 10, 2024 You can try my method, you have to calculate the new direction: Once you determine that the NPC has an effect on the player, you can calculate the direction that the NPC needs to change direction to avoid the next collision. This calculation may include: * Calculate the direction vector from the NPC's position to the player's position. *Adjust NPC navigation based on this vector, for example using the lerp (linear interpolation) method to make navigation smoother. You can also go to Google to find out how to do it suitable for your game Quote Link to comment Share on other sites More sharing options...
0 Poring King Posted July 10, 2024 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Share Posted July 10, 2024 You can use "npcwalkto" . You can see it on your server files script_commands to properly guide you how to use all npc script syntax Quote Link to comment Share on other sites More sharing options...
Question
hadie
How to make npc move direction when we touch the npc?
Like this
Before touch normal after touch the direction will follow where you are
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.