I am unable to locate a cast to ProjectileMovementComponent when trying to alter velocity of an actor on an overlap event. I can retrieve velocity of Actor and Component but am unable to set it.
I would have thought that I could cast component to a ProjectileMovementComponent and upon successful cast, I can set velocity.
I’m trying to set a projectile’s velocity right after spawning it from weapon’s blueprint. I cannot figure out what to cast to - projectile component is missing from list.
Projectile Movement is already accessible when you cast to Blueprint using it. Casting is a way access components of another Blueprint, but you don’t actually cast to component itself. For example, if you Spawn Actor from Class and select a projectile Blueprint as your class, you can then pull off Return Value and find Projectile Movement.
In image Roddy posted, it seems like you want to get Projectile Movement from a projectile that overlaps a sphere component. If that’s case, you first need to cast to projectile’s blueprint. Then you can get Projectile Movement component and set any of its variables from there.