I’m trying to create an actor that can be spawned into the world by the player. Once spawned, the actor should remain stationary until a secondary action (triggered through an interface) causes it to act like a projectile. However, I’m struggling to properly activate the ProjectileMovementComponent.
Here’s what I’ve tried so far:
Initialization:
Set Auto Activate to false on the ProjectileMovementComponent.
Set Auto Tick to false.
Manually initialized values for Initial Speed and Max Speed.
Activation Attempts:
Used the Activate node to enable the ProjectileMovementComponent.
Attempted to call UpdateComponent on the ProjectileMovementComponent.
Tried manually adjusting velocity and calling SetVelocityInLocalSpace.
Alternate Methods:
Using an impulse directly works, but I would like to rely on the ProjectileMovementComponent for future flexibility with projectile-related behavior.
Despite these efforts, I can’t seem to make the actor launch or behave like a projectile using the ProjectileMovementComponent.
Goal: I want the ProjectileMovementComponent to handle the movement and physics once activated, rather than relying on impulse or custom logic.
Question: What is the proper way to activate a ProjectileMovementComponent for an actor that was spawned with it initially deactivated? Are there specific steps or settings I might have overlooked to make it work as intended?
i’m trying to use the projectile property, cause i need a level on homing on them, and i believe that add impulse would be similar to what you have shown me, but i could be wrong still new at this
I think the projectile movement component utilized a forward vector or so to propel the object in that direction pointing. Whereas add impulse will need a direction.
Projectile Movement Component is handy when it works as intended. For example in a 2D sidescroller all I need do is spawn projectile left or right it immediately heads in the approapriate direction the character is facing left or right, so one can save on all that extra left right logic right there.
But I still have not made a homing rocket / missile projectile myself so I couldn’t tell you much about it. I will probably try that in my ship scroller template some day. For games like Capcom’s U.N> Squadron or Konami’s Gradius or Lifeforce.