A pawn appears during the simulation? it can be avoided?

During the simulation there is a pawn flying.
I would like it not to be spawned if possible.
Or use the spectator pawn class instead.

Because it is using the player class.
And all actor components are running and the screen is full of error messages. (Like for example having an Invalid PlayerState.)

Also the enemy AI could detect it and try to kill it.

So he’s an annoying character that would be better if he wasn’t there.

Is there a way to make it not appear?
How can i do it?

Thank you so much!!

Which class is spawned, or whether any class is spawned at all, is controlled by your GameMode.
Set up your GameMode to specify the default pawn class for the player.
Override the GameMode player creation function SpawnDefaultPawnAtTransform to make it so that you only get player controllers, and don’t immediately spawn a pawn.

1 Like

I think I know what may be going on then.
Is there any way to tell from GameMode if I’m running simulation mode?

I think I have the GameMode set correctly.

1

But I can’t select zero players

2

So I think my OnPostLogin function is generating the player then.

If there is any way to know if I am in simulation mode I can prevent this from happening.

Thank you so much!!

i did it. but it does not work… did i it well?

the other version is not virtual

I had to modify my spawn function.
I finally got it doing this.
It seems that the actor must be created, possessed and then destroyed.

10

It would have been easier to override some function but that didn’t work.
Anyway, thanks a lot for helping.
It is much appreciated

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.