public void Execute() { float radius = Constants.AvoidanceRadiusPlayer; int hash = GridHash.Hash(Pos, VehicleHashJob.kCellSize); CellMap.Add(hash, new VehicleCell { Position = Pos, Velocity = Velocity, Radius = radius }); }
public void Execute([ReadOnly] ref VehiclePhysicsState physicsState) { float radius = Constants.AvoidanceRadius; int hash = GridHash.Hash(physicsState.Position, kCellSize); CellMap.Add(hash, new VehicleCell { Position = physicsState.Position, Velocity = physicsState.Velocity, Radius = radius }); }