How Do I Make A Npc Predict The Player Position

So I Have A Npc That Shoots Bullet Using Fastcast And I Dont Know How To Predict Player Position:

  1. What do you want to achieve? I Wanna Find The Perfect Angle/Position To The Npc Shoot And Hit The Player, Even If He Is 1000+ Studs Away I Want To Hit It, Even If He Is At Insane Speed, Also The Bullet Is Not Affected By Gravity But If You Can Show Me How I Can Make It Hit Even Being Affected By Gravity I Would Be Thankful :slight_smile:

  2. What is the issue? I Have No Idea In How I Do It

  3. What solutions have you tried so far? I Tried Looking Up Some Stuff Like That But It Dont Work With Fastcast, The BIGGEST Problem Its The Magnitude, That I Have No Idea How To Calculate, The Closest Thing That I Found Has This

So If You Can Show Me I Would Be Thankful.

1 Like

Hey! What you’re trying to do is a little complicated to explain here in text…
so here’s a PERFECT video showing you how to achieve your goal (detailed explanation) by @5uphi

1 Like

Im Using Fastcast, Not AssemblyLinear Velocity, Also How Do I Now The Duration?

Let Me Test A Thing Really Quick

It Worked!, I Alread Saw And Said About It In The Topic, I Just Didnt Know How Do I Calculate The Duration As Im Using Fastcast, In My Mind, I Thought That The Speed For The Fastcast Has In Seconds, Like, 1000 Is 1000 Studs Per Second And I Was Right, So If The Speed Of The Bullet Its Constant Then We Can Divide It By The Magnitude Then We Get The Duration, For A Example, 1000 Speed With Magnitude 1000 Its 1 Second Then For 500 Magnitude Its 0.5 Second And Using The Formula In The Video We Can Predict The Player Movement!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.