#How to tell if a ghost is predicted or interpolated inside a FixedStepSimulationSystemGroup System?

1 messages · Page 1 of 1 (latest)

tropic topaz
#

Hello, I'm doing Prediction Switching and I have a movement system for my interpolated enemies running inside a FixedStepSimulationSystemGroup. Now, I want to separate my enemy behaviors based on if they are predicted or interpolated but I can't find a way to do that in an efficient way..

For example:
1.PredictedGhost component is always present on ghosts that can be both interpolated/predicted on the Server world but values such as ticks are set to "Invalid" at all times.
2. Simulate tag is always present on the server inside FixedStepSimulation.

I was wondering if there is a better way than manually adding components like "IsPredicted" on the server???

Also here is what i mean by ticks are set to invalid for interpolated AND predicted ghosts on the server

warm sundial
#

Huh, I was pretty sure that Interpolated ghost has Predicted Ghost component removed

tropic topaz
#

its just always there with invalid values 💀

warm sundial
#

Weird, is it switching to predicted then switch back to Interpolated?

tropic topaz
# warm sundial Weird, is it switching to predicted then switch back to Interpolated?

My logic is :

  1. Spawn an Interpolated Enemy
  2. If an enemy comes close to the player within a certain radius : Switch to Predicted
  3. If an enemy gets away from the player : Switch to Interpolated

It's working perfectly fine.

My issue is that I want to know which enemies are predicted and which ones are interpolated on the server side but without adding a completely new IEnableable component just to do that

#

And PredictedGhost seemed ideal but for some reason it's ALWAYS there on the server side, it doesn't matter if the ghost is currently predicted or interpolated. It always has the Predicted Ghost component no matter what.

On the client side the Predicted Ghost component gets removed/added properly but this does not happen on the server