mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-17 18:40:33 +00:00
Benchmark: monsters move with 10% probability to make sure we can detect change detection in NT
This commit is contained in:
parent
df7a343d7e
commit
68c7d14a16
@ -148,5 +148,5 @@ MonoBehaviour:
|
|||||||
syncMode: 0
|
syncMode: 0
|
||||||
syncInterval: 0.1
|
syncInterval: 0.1
|
||||||
speed: 1
|
speed: 1
|
||||||
movementProbability: 0.5
|
movementProbability: 0.1
|
||||||
movementDistance: 20
|
movementDistance: 20
|
||||||
|
@ -5,7 +5,13 @@ namespace Mirror.Examples.Benchmark
|
|||||||
public class MonsterMovement : NetworkBehaviour
|
public class MonsterMovement : NetworkBehaviour
|
||||||
{
|
{
|
||||||
public float speed = 1;
|
public float speed = 1;
|
||||||
public float movementProbability = 0.5f;
|
|
||||||
|
// movement probability:
|
||||||
|
// 0.5 is too high, monsters are moving almost all the time.
|
||||||
|
// only-sync-on-change shows no difference with 0.5 at all.
|
||||||
|
// in other words: broken change detection would be too easy to miss!
|
||||||
|
[Header("Note: use 0.1 to test change detection, 0.5 is too high!")]
|
||||||
|
public float movementProbability = 0.1f;
|
||||||
public float movementDistance = 20;
|
public float movementDistance = 20;
|
||||||
|
|
||||||
bool moving;
|
bool moving;
|
||||||
|
Loading…
Reference in New Issue
Block a user