There are screendumps of the key blueprints at the end.
I’m a bit puzzled, because I ‘think’ it’s all set up correctly so maybe its a bug
I’m making something like a simple, home-grown guided missile system, in Blueprints. For certain reasons, I’m not using the native projectile component. And I’m using not using C++ or touching any part of the NavSystem.
When I launch the game, everything works as intended up to a certain point. Here’s how it goes in my home-rolled missile blueprint:
- enemy (a physics-enabled pawn) chases the player like a
homing missile (for testing purposes, their MaxSpeeds are the same… and I can see this as I play… all good up to here) - enemy catches the player
- a simple HitEvent is triggers a RadialForce impulse on the Player Pawn (there is 0 Force factor on this component, I’ve checked this several times, and I’ve set ‘ignore owning actor’)
- enemy bounces away
- enemy resumes the chase (all good up to here)
The thing is, in game, after resuming the chase… the enemy is NOW flying… roughly… 15% slower than my player. The enemy can no longer quite match the MaxSpeed of the player. When I print their CurrentForwardSpeed to the screen:
-
the player’s is -700 (coinciding perfectly with his MinSpeed, he’s flying in reverse)
-
the enemy’s is 700 (again, coinciding perfectly with his MinSpeed, he’s flying forward)
Always, when I begin play, the enemy observably flies at the right speed… but after the first collision which fires the Radial Force impulse… the enemy NOW observably flies about 5% slower. Because the enemy recovers after each bounce, and gives chase again, I can keep on allowing the enemy and player to collide …firing the RadialForce impulse… the enemy keeps on flying slower and slower, about a 5% reduction each time, after each collision.
However, when I print the players speed to the screen it’s always -700 and the enemy speed is always 700, when they accelerate to their top speed. But the enemy always flies observably slower after a collision (he works fine and always flies at the right speed before any collisions).
Some things that might be useful to know. I’ve:
- set the “ignore owning actor” on the player’s Radial Force component impulse
- and on it I’ve checked Force is set to zero
- and the impulse isn’t affecting the player’s movement when it’s triggered (which is good, as it should be)
But the issue is still happening, does anyone have any thoughts please?