Announcement

Collapse
No announcement yet.

Make a projectile move again after it comes to a stop

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Make a projectile move again after it comes to a stop

    Hi, I have a projectile that can bounce off of walls using the Projectile Movement Component. The weapon can then retrieve it so that the projectile can be fired again. And this works fine, if I retrieve it while it is still in motion. However, if I try the same after the projectile has completely come to a halt, it refuses to move again.

    I've tried reactivating the projectile movement component and setting its local space velocity again, but to no avail. Does anyone know of a workaround to this? Is there someway to kickstart the component again?

    Edit: Also tried it out with the bounce turned off, but its still the same.
    Last edited by Stormrage256; 02-22-2020, 11:42 AM.
    Unreal Possibilities
    Wave Spawning System | Tower Defense Starter Kit | Floating Damage Texts

    #2
    Did you manage to find a solution to this problem? I'm in a similar situation :S This is my Solution so far:

    Click image for larger version

Name:	Untitled.png
Views:	216
Size:	56.0 KB
ID:	1775921

    but it not really working (I want it to move again if it has been hit by another projectile.) . I also tried a solution were the component is destroyed and then i add a new one to the game object which is a very bad solution tbh but it works. Though the overhead for that compared to just resetting the Projectile move component is probably great. The Set Active with the reset bool seems to do absolutely nothing :/

    Comment


      #3
      Unfortunately I couldn't find a way to reactivate it once the projectile came to a stop. Atleast in blueprints. So I ended up destroying the component, either when the projectile stops, or when it's being retrieved back by the player. When you fire it again, the projectile movement component gets added again. It wasn't an issue in my case, since the gun could only fire one reusable projectile, like the Translocator from Unreal Tournament. And one projectile component being added dynamically shouldn't cause an issue since we're doing that anyways with normal projectiles every time they're spawned. But yea, it would have been a lot better if we could just call a Reset on the component.
      Unreal Possibilities
      Wave Spawning System | Tower Defense Starter Kit | Floating Damage Texts

      Comment

      Working...
      X