Make projectile move actor (like a stake gun)?
So I've made a projectile actor that will stick to enemies when hit. Using LineTraceForObjects and AttachToComponent I can attach the projectile to the correct bone and all that.
Now, if the enemy is dead, ie it goes ragdoll/sim physics, I'm attempting to use a physics handle to grab the actor and drag it with the projectile. First problem is that to attach the projectile actor to the enemy actor, I need to use "stop movement immediately", or it will not work very well.
This translates into the situation whereby I've managed to grab the enemy actor with the physics handle, but obviously it will not move. I've tested out some set target location and rotation functionality with the physics handle, but it's not giving me any decent results, even with interp speed.
Was hoping anyone had a clue on how to get this working? Is there any way to make the projectile start moving again, after it has attached to the actor for example?
I've tried to get velocity before hitting and set velocity after but that does not produce any decent results. Also not sure how I can make the projectile stick to the wall again if I use the physics handle to move the dead enemy.
Got it. I had to set the location of the physics handle, not the actor... Doh.
Still a bit spotty as it doesn't seem to fire the script sometimes but when it does, it works perfectly.
answered Mar 08 '19 at 10:47 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here