The situation is the Projectile can move in blueprint or in map when I simulate, but when I use a character to launch the projectile, it can‘t move…just stay in place.
there’s any help?
You can see the velocity of projectile change to 1000 when I simulate, but when I use chracter to launch it, its velocity is 0.
What is your projectiles initial speed & max speed set to in the projectile movement component? Try setting a high value like 3000 for both and see if it moves.
You can also set which part of the projectile should move by dragging the movement into the event graph and setting “Set updated component” passing in the component that is going to move (make sure that it’s mobility is set to movable)
I set the projectile initial speed and max speed as 3000, and I use C++ to do this.
I think maybe the porblem comes from the velocity of projectile as I show above in the picture, so I modified the code to assign the velocity, but it seems doesn’t work
Try
ProjectileComp->SetVelocityInLocalSpace(FVector(InitialSpeed, 0, 0));
ProjectileComp->UpdateComponentVelocity();
ProjectileComp->bSimulationEnabled = true;
ProjectileComp->bRotationFollowsVelocity = true;
Thanks, bro, I’ve solved this problem… I’m an idiot when I made the projectile collision profile I set it be blocked by pawn so the projectile can’t move
Well perhaps it’s time to take a short break to get your concentration back. You can overlook this sort of stuff if you are tired or overworked.
You’re right, it’s time to go to bed good night and thanks again!