A projectile 100% from scratch ?

Hello everyone !

I just began working with blueprints, and I am trying to do a projectile.

Followed a bunch of tutorials and it works great, however I would like to understand how it is really working behind the hood, all the tutorials I watched are using the “projectile movement” component which is doing all the work, but I would love to see different approaches, doing everything from scratch, just adding ourselves how the projectiles is moving forward, with and without being a physical object affected by gravity, etc etc

Would you know where I can find that ?

Thanks !

One way to do this is to move actor forward by 1500uu every tick.

I made some a while ago, couldn’t find it thogh

You can have a movable line trace, for that you don’t even need an new actor as you need in the Projectile Movement (this code can run in the weapon itself), just add the velocity (direction * speed) to the start position of your line and that’s it

Be aware the line can skip a space if it’s too fase, to fix it you’ll need to cast the line from the last frame position to the next frame expected position, it’ll cover any collision lost due to speed or poor frame rate.

You can aproach this the same way with independent actors, just move the actor each frame and use it’s current position as the end of the line trace.

Hope this helps :slight_smile: